-
AuthorPosts
-
September 20, 2013 at 12:32 pm #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
September 20, 2013 at 7:23 pm #164178Hey 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,
JosueSeptember 20, 2013 at 9:50 pm #164232Hey 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
September 20, 2013 at 9:52 pm #164234Hi 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,
JosueSeptember 21, 2013 at 12:11 am #164290Hi 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
September 21, 2013 at 12:13 am #164292Except i used the code of course – &#eightninexsixtwo;
September 21, 2013 at 1:39 am #164325Hello!
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!
IsmaelSeptember 21, 2013 at 5:00 am #164342Hello 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,
JosueSeptember 23, 2013 at 2:40 pm #165163Hi 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
-
AuthorPosts
- The topic ‘Changing Menu Label to an image’ is closed to new replies.