Archived topic
ADD MY ACCOUNT LINK IN MAIN NAVIGATION
17 replies · Started by Iván on February 24, 2018
Hi,
¡incredible theme! Some questions:
* How can I add a MY ACCOUNT link in main navigation menu? I would like it to be displayed at right, next to the search icon and the cart.
*How can I maintain my logo centered having one widget at the righ?
Thank you so much!
Iván
Hi there,
Your site is currently under construction page.
Can you unlock it so we can see what you have so far?
Thanks!
Hi Leo, I've the same question. I want to add an account FA icon in main navigation menu, but I want this icon next to search and cart icons. I also want this icon not to be in the mobile drop-down menu, but next to the search and cart icons.
Very good job and thank you very much.
You could use a plugin like this to add the icon to your menu: https://en-ca.wordpress.org/plugins/menu-icons/
Then give the menu item these classes: menu-item-float-right hide-on-mobile
Here's how to add classes: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
Let me know if you need more info :)
Hi Tom, Thanks for the quick reply.
The first class (menu-item-float-right) does its function, but I think that in my question I did not express myself completely.
In my website, http://www.bebertstudio.com, in the mobile format, the primary menu shows up when you push the menu button. Aside that menu appear the search and cart icon. That's where I want to put the account icon, not in the dropdown menu.
Let's see if now I've explained myself well.
Thanks!
Ah, in that case, you'd have to use this hook: https://docs.generatepress.com/article/mobile-header/#adding-html-inside-the-mobile-header
Let me know if you need help with the HTML :)
Hi Tom, in which hook do I have to insert it? This hook is for mobile headers only?
In the website (https://bebertstudio.com/), if you see in desktop resolution, you can see, next to primary menu, three icons: search, cart, and the last one, the account icon that I've included with the "menu-item-float-right" class, but, in mobile resolution, this icon appears in the dropdown menu, not beside to the other icons (search and cart).
I want this three icons always appears together, in all resolutions.
Thanks again
You would need to manually add the hook, using this code:
add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
function tu_mobile_header_html() { ?>
<div class="mobile-bar-items">
<a title="Mi cuenta" href="https://bebertstudio.com/mi-cuenta/"><i class="fa fa-user"></i></a>
</div>
<?php
}
Adding PHP: https://docs.generatepress.com/article/adding-php/
Once that is added, it should display in the mobile header as well.
Let me know :)
Hi Tom;
As you can see in mobile web, the account icon shows on the left of the main logo.
How can I put it next to search and cart icon?
thank you very much again
I just adjusted the code above - can you replace your function with the new one?: https://generatepress.com/forums/topic/add-my-account-link-in-main-navigation/#post-550370
Hi Tom, you're the #1!
Just one more question, How can I delete the icon in the mobile drop-down menu?
If you enter with your mobile, you can see the new account icon and if you press the dropdown menu icon, in the last place appears the account icon.
I only want to delete in the mobile drop-down menu, but in the desktop menu the icon has to appear as it is now.
Thanks!!
Give it this class: hide-on-mobile
Adding classes: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
Hi Tom and sorry, this class doesnt works! I've given it two classes: "hide-on-mobile" and "menu-item-float-right".
Thanks
Can you double check the link to your site?
It's not loading for me.
Hi Leo, the website is working (https://bebertstudio.com/).
Thanks!