WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Font awesome icon for home-link

[Resolved] Font awesome icon for home-link

  • I want to change the “home” text in the menu to font awesome icon (icon-home)
    I have twenty twelve theme and font awesome activated, but I cant get it changed to the default menu.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Found the answer: add the icon-code as value to show_home in header.php
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’, ‘show_home’=>'<i class=”icon-home”></i>’) ); ?>

    I didn’t know it’s a string value at first but rather boolean show/hide.

    terrytsang
    Member

    @terrytsang

    I have made a wordpress font awesome icons plugin as well, you all can have a try 🙂

    WordPress Font Awesome Icons

    Skivsamlaren
    Member

    @skivsamlaren

    My solution for the Quark theme, which sort of is based of Twenty Twelve:
    In wp-admin > Appearance > Menus > Navigation Label, I added:
    <i class=”fa fa-home fa-lg”></i>

    Sinac
    Participant

    @sinac

    Skivsamlaren it is better solution, but <i> will be nested in <a>
    this is may incorrect for SEO.

    Andrew Nevins
    Forum moderator

    @anevins

    It’s incorrect for multiple reasons to use empty HTML just to style things. You can use the :before and :after pseudo selectors in CSS for the same purpose without such issues.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Font awesome icon for home-link’ is closed to new replies.