Archived topic
search bar in menu
4 replies · Started by Den on February 10, 2021
Hello team,
Is there a way I can use to show a search bar without showing the menu? as I do not have such big data to show the menu on my website.
Whenever I turn off the navigation bar, it closes the search box as well (which I don't want)
What to do?
Hi team,
I followed one fo the thread created by Tom (Lead Developer) here - https://wordpress.org/support/topic/generatepress-search-how-to-change-visual-display/
HE SAID
add this function:
add_action('generate_inside_navigation','generate_add_custom_search');
function generate_add_custom_search()
{
echo '<div class="custom-search">';
get_search_form();
echo '</div>';
}
Then add this CSS:
.custom-search {
float: right;
}
I followed as he said and it is now functioning.
But, the search bar does not work on Mobile Devices (which is crucial) how do I make it work on mobile devices.
Link for my site link is present in Private information section :)
Hi there,
disable the Mobile Header in Customizer > Layout > Header. This will keep the same layout as your desktop.
Thanks :)
You're welcome