Archived topic
Relocate button in navbar with hook generate_menu_bar_items
5 replies · Started by Diogenes on December 12, 2020
Hi.
I'm trying to implement a button in my navigation bar using the new hook: generate_menu_bar_items with blocks, but it is placed last in my navigation bar.
There is an option to be able to place it between the navigation menu (second, third, etc), which does not imply developing the whole menu with this hook and blocks.
Guide me through this tutorial.
I would appreciate the help.
Hi there,
the simplest way to add a button inside the menu is to simply style a menu item to look like a button:
https://docs.generatepress.com/article/adding-buttons-navigation/
Hi David, thanks for replying.
I already knew that method, in fact it is what I use for my websites.
I just wanted to know if the method with the generate_menu_bar_items with blocks hook was possible, since it is more flexible, simple and easy to implement, especially for CSS customization.
Is this possible to do?
If you need the buttons somewhere in between the menu items then the method David suggested is the best and only way :)
I understand Leo.
Thanks anyway.
Regards.
No problem :)