Archived topic
Adding Icons to Menu Items (navigation bar)
11 replies · Started by Howard on December 25, 2017
Hi Guys:
Im having a problem adding the fontawsome icons to link to my twitter and youtube channels that when I did it a week ago worked. Something now I must be doing wrong.
I go to menu and custom links: then I put in my twitter home page url....then the fontawsome twitter code in LINK TEXT...then i ADD TO MENU... AND SAVE...(and refresh) NOTHING ON MY NAVIGATION BAR...
i THEN PUT IN FLOAT RIGHT..still nothing?? (I assumed I was adding to my Navigation Bar to the right of my menu items....NO?
thanks
Howard
Hi Howard,
I'm not seeing any custom links in your current navigation. Are you sure you're editing the menu set to your primary theme location?
Hi Tom
The only thing maybe ... I’m doing wrong:
“Are you sure you’re editing the menu set to your primary theme location?
Please expand on this
Howard
NOPE...Im doing it right and nothing is working as i tried it again a few times
Please send me email and Ill let you log in and find out what might be problem
Appreciate it tganks
Howard
Hi there,
I can see the icon now? https://s14.postimg.org/qni7jkg6p/2017-12-26_1141.png
Hi Leo
Indeed...my o my...its a bit tedious not being a coder. I had the general settings for GP2.0 fontawsome CHECKED AS YOU MENTIONED IN ANOTHER forum comment. It loads everything by default. So I unchecked the box.
I will now add float right code and get it over to the other side..
What is the EASIEST WAY to get a bit of different color to the icons...or even make them a bit larger on the navigation bar?
thanks HOWARD
PS The fontawsome icon is NOT SHOWING on mobile. I checked other forum articles but cant find an answer?
Howard
You can make it float right with this: https://docs.generatepress.com/article/adding-icons-to-menu-items/#floating-the-icon-to-the-right
This method should allow you to change the background color or the icon color itself:
https://docs.generatepress.com/article/adding-buttons-navigation/
I just checked and the icons are showing on mobile as well. Try clearing your browser cache.
Hi Leo:
The icons are showing on MOBILE....However: It shows on mobile when I OPEN my MOBILE MENU. (at bottom of the categories and pages drop down on left ).
I wanted the icons to show on the MENU NAVIGATION BAR, AS IT does on my DESKTOP SITE. How can I get the fontawsome icons to show on MOBILE MENU /NAVIGATION BAR IN mobile setting withut OPENING the menu tab?? Doesn't make sense when you look at it on mobile??)
Thanks
Howard
It made sense to me. I've seen all kinds of layout being implemented so it's hard for me to tell whether something make sense or not.
Thank you for the explanation.
This should help: https://docs.generatepress.com/article/mobile-header/#adding-html-inside-the-mobile-header
Hi Leo
What I meant to say about “making sense” was that it seemed strange to me that the icons were clearly visable on desktop and not on mobile.
In any event.. I believe I’ll need snippets plugin for your link on adding php?
Or can this be added to GP hook?
add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
function tu_mobile_header_html() { ?>
<?php }
Thanks again
Howard
Yup or if you are using a child theme: https://docs.generatepress.com/article/adding-php/