Answer the question
In order to leave comments, you need to log in
How to implement 2 search forms on the same page in WordPress?
How to implement 2 searches on a website in WordPress? One search in header.php, the second in footer.php.
I do a search with a filter, I use labels as a filter.
<form role="search" method="get" id="<?php bloginfo('url'); ?>" action="<?php echo home_url( '/' ) ?>" >
<div class="form_search">
<input type="text" placeholder="Введите запрос..." value="<?php echo get_search_query() ?>" name="s" id="s">
<select name="tag" form="<?php bloginfo('url'); ?>">
<option value="product">Товары</option>
<option value="service">Услуги</option>
</select>
<button type="submit" id="searchsubmit">Поиск</button>
</div>
</form>
site.org/?tag=product&s=&tag=productduplicates the 2nd search.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question