2
votes

How I will make custom taxonomy search WordPress as lime the image using a function without any plugin

when someone select product from dropdown it will search for the product when someone select category and type search field it will search category name
when select author it will search user

ss

1
I would suggest using a solution from - wordpress.stackexchange.com/a/228663/33966Ali Hussain

1 Answers

0
votes

The search form is found within your theme's searchform.php file. If your theme does not have one, creating one will override the WordPress default. You might do something like:

<li id="search">
  <label for="s">Search:</label>   
  <form id="searchform" method="get" action="/index.php">
    <div>
      <input type="text" name="s" id="s" size="15" />
      <select name="searchcat">
        <option value="0">Search Posts & Pages<option>
        <option value="1">Search WooCommerce Products</option>
        <option value="2">Search Custom Post Type</option>
      </select>
      <input type="submit" value="Search" />
    </div>
  </form>
</li>

The search results are found in the your theme's search.php file. Again, if your theme does not have one, you can create one to override the default functionality.

Then, based on what it selected from the pulldown, you can create different queries to retrieve the required results.