Hello, I need to know if there is the possibilty, to have a Stick Search Bar at the top of the Website, Like the Facebook Marketplace because If I would like to search for some item, I need to scroll up, and that consumes time. The best Way to procede would be to have a search button In the header navbar . Thank you for your support
I had to add the following code in the header.php, but when I hit search It doesnt find anything although my search should return something, Could anybody explain me how to make it work correctly?
<form method="GET" action="<?php echo esc_url( home_url() ); ?>" class="search-form">
<input type="search" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" autocomplete="off" placeholder="<?php echo esc_attr_x( 'Search', 'noun', 'listinghive' ); ?>" class="search-field">
<input type="hidden" name="post_type" value="post">
<input type="submit" class="search-submit">
</form>
I had to replace value=“post” to value=“hp_listing”
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.