Archived topic
Inline text with button in Generateblocks
9 replies · Started by Nacho on March 18, 2021
Hello,
I´m using GP + GPP and Generateblocks and I was wondering how can I create an inline text with a button like this website Topbar https://www.helpscout.com/all-features/
Hi there,
2 options:
- Use an custom HTML widget in the top bar widget area:
https://docs.generatepress.com/article/top-bar-widget-area/
- Create a block element with GenerateBlocks and use the generate_before_header hook.
Let me know if this helps :)
Hello Leo,
I´ve just tried the GenerateBlocks and the problem with the hook was the priority that I had to set it to 1.
Thanks a lot for the help.
You shouldn't need to set the priority to 1 unless you have other content added in the same hook.
Glad it's working now but let me know if you need another look :)
Hello Leo,
Actually I don´t have any other content in the same hook but if I don´t set the priority to 1 it does not work.
Can you take a look at the website I´ve added to the topic?
Hi there,
the before_header hook is used by the Theme for adding elements such as the Secondary you have positioned above the header... so in this case you do need to set the Priority to a lower value.
Hello David,
What value should I put in the priority?
Hi Nacho,
Yes, set the priority to 1 works, since you want it to locate on top of everything else.
Hello Ying,
Thanks a lot for the suggestion.
Have a nice day.
You are welcome!
Have a great weekend :)