- This topic has 10 replies, 2 voices, and was last updated 7 months ago by
David.
-
AuthorPosts
-
August 22, 2022 at 3:42 am #2319833
Tugce
Hi,
How can I add a button to header, right after the ‘Contact’ and the language switcher?
Best wishes,
Efe
August 22, 2022 at 4:12 am #2319858David
StaffCustomer SupportHi there,
couple of options:
1. Make a menu item look like a button:
https://docs.generatepress.com/article/adding-buttons-navigation/
2. Use a Block Element to add the button:
https://docs.generatepress.com/article/block-element-hook/
i) enable the Elements module in Appearance > GenareatePress
ii) Appearance > Elements -> Add New -> Block Element
iii) Select the Hook:menu_bar_items
iv) add whatever you need to the editor
v) set the Display Rules > Location toEntire Site
or the locations you require.NOTE this will appear also on Mobile devices aside of the hamburger icon.
You can use GP hide-on-* classes to remove it if its not required:https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 23, 2022 at 4:43 am #2321138Tugce
Hi David,
Thanks for the information, but I cannot see a hook name as menu_bar_items. I’m not allowed to write it in the hook name section as well.
I just want to add a button as shown on the following link:
https://ibb.co/rwmPc4YBest wishes,
Tugce
August 23, 2022 at 5:06 am #2321168Tugce
Hi David,
Just a quick update. I made the changes you mentioned, but nothing changed on the menu.
Best wishes,
Tugce
August 23, 2022 at 5:42 am #2321198David
StaffCustomer SupportIn Customizer > General, can you make sure the Structure is set to Flexbox ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 23, 2022 at 6:19 am #2321232Tugce
Hi David,
I switched to Flexbox but nothing changed on the menu.
August 23, 2022 at 6:23 am #2321241David
StaffCustomer SupportIn your Block Element you should now see the
menu_bar_items
hook in the list of hooks, select that. NOT a custom hook.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 23, 2022 at 6:45 am #2321261Tugce
Hi David,
Thanks, it worked. How can add some CSS such as shadowing?
Besides, would it be possible to hide that button for mobile view?
Best wishes,
Tugce
August 23, 2022 at 6:48 am #2321269David
StaffCustomer SupportDo you have GenerateBlocks Pro ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 23, 2022 at 8:28 am #2321506Tugce
Hi David,
No, I don’t have it.
How can I hide the block for the mobile view?
Best wishes,
Tugce
August 23, 2022 at 8:42 am #2321522David
StaffCustomer SupportSelect the Block in the editor, go to Advanced > Additional CSS Classes and add:
hide-on-mobile
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.