Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1028596
    DiamondAlexander
    Participant

    Hello!

    I’ve seen people use plugins for this or add code to their functions.php file but I didn’t want to edit that without checking in with you first.

    What code do I need to add to my menu item in order to either a) show a Font Awesome icon in front of the link or b) display:none the link and just show the icon?

    I want to display a home icon to represent the home link.

    Thank you,
    Diamond

    #1028601
    DiamondAlexander
    Participant
    This reply has been marked as private.
    #1029082
    Jade
    Moderator

    Hi there,

    Instead of adding a text for the navigation label, try adding this: <i class="x-icon-home"></i>

    Hope this helps.

    #1029555
    DiamondAlexander
    Participant

    Hi Jade,

    I did try that way and it didn’t work for me. It leaves a blank space that is linked but it doesn’t show an icon. It’s so weird because with widgets, I can add in icons but it’s tougher with the navigation menu.

    Is there another way?

    #1029798
    Friech
    Moderator

    Hi There,

    In that case you need the icon unicode to supply on the data-x-icon attribute. Look for desired icon unicode here.

    The complete code should be like below; see your Our clients menu item.
    <i class="x-icon x-icon-heart" data-x-icon="&#xf004;" ></i>

    Hope it helps, Cheers!

    #1030729
    DiamondAlexander
    Participant

    That worked perfectly, thank you! Can I ask why it needed the unicode instead of a normal shortcode? I’m just curious 🙂

    Thanks!

    #1031409
    Friech
    Moderator

    Glad we could help, shortcode does not work on menu. You can read more about that data-x-icon here.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1028596 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>