Archived topic
How do I add a search functionality to the primary navigation menu?
1 reply · Started by Richard on July 21, 2020
How do I add a search button like this to my main menu?
Hi there,
you could use a Hook Element to add the Button inside the Navigation.
https://docs.generatepress.com/article/hooks-element-overview/
At this time you would need to create 2 hooks.
1. inside_navigation for desktop.
2. inside_mobile_header for mobile.
It will require some CSS to position it. Happy to help with that.
In the next GPP 1.11 update we have added a hook that displays on both nav and mobile header and removes the need for CSS positioning. We look to release GPP 1.11 for Alpha testing in the next 24 hrs.
The HTML for the modal could also be hooked in after_footer for example.