Archived topic
Placing a button in mobile header
7 replies · Started by Vish on January 23, 2019
Hello
How can I place a button in the Mobile Header (only in mobile) as in the below image:
Note: I use mobile header. Have included my site link as well
Hi there,
1. Create a new Hook Element:
2. Set the hook to generate_inside_mobile_header
3. Add your button to the content field like this:
<div class="mobile-bar-items">
<a class="button my-custom-button" href="URL TO YOUR PAGE">Get Started</a>
</div>
4. Set the Display Rules to whatever you need.
Let me know if you need more info :)
Thanks Tom, it worked like a charm! :)
You're welcome :)
Hi Tom,
I'm also trying to add a button to the mobile header on my site using the same code but I can't get it to display.
Can I please PM you my site?
Cheers,
Matthew
Hi Matthew,
Can you start a new topic, and share the link to your site through the Private Information field?
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Note: Only the thread starter has the capability to use the Private Information field.
Many thanks Fernando :)
You're welcome and hope to hear from you soon, Mathew! :)