Archived topic
Creating hook for sticky header
1 reply · Started by Gao on August 19, 2022
Hi, GP team,
For this site, americanalloyfab.com, there is a button on the right end of the sticky header.
And we know in GP Elementor, there is a function called custom hook, but we never use it.
We thought it may be the solution to add anything in the sticky header as the example site shows.
Do you have a such solution?
Thank you.
Hi there,
that website is real fancy, and i can't tell you how to replicate that.
However, you can use a Block Element - Hook type in Appearance Elements:
https://docs.generatepress.com/article/block-element-hook/
In the Hook select box you can choose: menu_bar_items.
And set the Display Rules > Location to Entire Site or the specific places you want to use.
Whatever you add to the block element editor will now be displayed after the Menu items , on Desktop, Mobile and Sticky Navigation.
If required we can use some CSS to remove the item where it is not required.