Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #164015

    Hi guys

    I have a client that wants to change the ‘Home’ label in the main nav bar to an image. (a little house icon) How do you do this? I have no idea?

    Thanks

    Masten

    #164178

    Hey finessecreative!

    Open /framework/php/class-breadcrumb.php and look for this line (189):

    ‘show_home’ => __( ‘Home’, ‘avia_framework’ ),

    Replace it by this:

    ‘show_home’ => __( ‘<span class=”iconfont”>⌂</span>’, ‘avia_framework’ ),

    Best regards,
    Josue

    #164232

    Hey Josue

    Thanks for that. I did that by editing in the winscp editor and it just gave a big error message for the whole site. Is the syntax right?

    Also I noticed that the little home symbol was replaced by a ‘?’ in the editor.

    Thanks

    Masten

    #164234

    Hi Masten!

    What error did you get?

    Regarding the symbol issue copy it from here (it’s the last one of each), i can’t paste it here because it actually turns into the icon.

    Regards,
    Josue

    #164290

    Hi Jouse

    I got

    Parse error: syntax error, unexpected T_CLASS in /home/practis2/public_html/wp-content/themes/enfold/framework/php/class-breadcrumb.php on line 189

    I used:

    ‘show_home’ => __( ‘<span class=”iconfont”>⌂</span>’, ‘avia_framework’ ),

    Thanks

    Masten

    #164292

    Except i used the code of course – &#eightninexsixtwo;

    #164325

    Hello!

    Inspect the “Home” menu using Google Chrome’s Inspect element then look for the unique menu id. It will look something like this:

    <li id=”menu-item-755″ class=”menu-item menu-item-type-custom menu-item-object-custom current-menu-ancestor current-menu-parent active-parent-item dropdown_ul_available”>

    Menu ID is #menu-item-755.

    You can add something like this on your custom.css or Quick CSS:

    #menu-item-755 > a {
    text-indent: -9999px;
    background: url('ICON IMAGE URL HERE') no-repeat top center;
    width: 30px;
    height: 30px;
    }

    Width and height will depend on the icon image size.

    Cheers!
    Ismael

    #164342

    Hello Masten

    Oh, i though you were referring to the breadcrumb “Home”, follow Ismael instructions, if you can provide us with an URL that would be really helpful.

    Regards,
    Josue

    #165163

    Hi guys

    Yeah I meant the main home label in the nav bar. Sorry Josue if I didn’t make it clear.

    That sorted it Ismael. URL here for your interest

    [removed]

    Cheers

    Masten

    • This reply was modified 11 years, 2 months ago by Kriesi. Reason: url removed on request
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Changing Menu Label to an image’ is closed to new replies.