[Resolved] woo My Account icon in nav

Home Forums Support [Resolved] woo My Account icon in nav

Home Forums Support woo My Account icon in nav

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #987736
    Paul

    Hello,

    I want the fa fa-user icon to display next to the cart icon.. outside of the main menu.

    not like this.. (https://docs.generatepress.com/article/adding-icons-to-menu-items/#floating-the-icon-to-the-right)

    How would I achieve this? I tried searching for ways and I found one solution but it only worked on mobile menus.. Would like the icon to be displayed on both displays.. Just as the Cart icon does. Please let me know.

    Thanks.

    Peery

    #987817
    David
    Staff
    Customer Support

    Hi there,

    For the Mobile Menu you can add your link/icon HTML using the inside_mobile_menu_bar hook.
    That article should work fine for desktop, just place it as the last item in the menu. you can also add the hide-on-mobile CSS class to remove it from the mobile menu dropdown.

    #987840
    Paul

    Then that would not show up like the Cart icon on mobile… the Account icon would be in the drop down menu.. Right?

    #987846
    David
    Staff
    Customer Support

    No – the hook will place it in the the container that the Cart icon is displayed. The second part will add it to desktop menu and hide it from the mobile dropdown menu.

    #988000
    Paul

    Ok ok.. I got what you saying now.. Thanks πŸ™‚ Working on it now will update.

    #988010
    Paul

    Hey can you check it please… Icon shows up when you visit homepage but when you start going to other pages icon goes away.. I have still not added the hook yet for mobile though.. Only working on desktop right now.. Thanks! also.. been watching the other articles today.. u been on it πŸ™‚ tell em u need raise πŸ™‚

    #988011
    David
    Staff
    Customer Support

    Cool – glad to be of help

    #988013
    Paul

    let me know if you can see icon on any other page than the home page please. desktop version

    #988014
    David
    Staff
    Customer Support

    The issue is because the FA icons are being loaded by Elementor – which is not present on the other pages. Theres a few workaround.

    Easiest one, are you intending to add any social icons or other Elementor designed content across your site? If so you then by hooking in or using widgets containing an elementor template will force the FA icon to load. Let us know

    #988023
    Paul

    Ok i got it now.. Just put it in the footer for now… Will display:none that one or something else later on πŸ™‚ Thanks for all the help.. now I work on the hook.

    #988030
    David
    Staff
    Customer Support

    You’re welcome.

    #988046
    Paul

    I lost the forum post when I found the hook code…

    This is what I got though..

    add_action( 'generate_inside_mobile_header_menu','my_account_mobile_menu' );  
    function my_account_mobile_menu() { ?> 
    	<i class="fa fa-user my-account-mobile-menu" aria-hidden="true"></i>
    <?php }

    showing in a weird place though. please let me know. thanks.

    #988102
    Paul

    I had the hook working earlier before i posted this forum.. Cant seem to get it working now..

    #988325
    Paul
    add_action( 'generate_inside_mobile_header','my_account_mobile_menu' );  
    function my_account_mobile_menu() { ?> 
    	<div class="mobile-bar-items">
    		<a title="My Account" href="#"><i class="fa fa-user"></i></a>
    	</div>
    <?php }

    works.. πŸ™‚ but.. user icon is on right side of cart icon on mobile.. and on left side of cart icon on desktop…

    here is forum – https://generatepress.com/forums/topic/add-my-account-link-in-main-navigation/

    #988365
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try adding this CSS:

    .nav-aligned-right .main-navigation .menu > li.hide-on-mobile {
        float: right;
    }
Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.