Using WordPress to make a “Product Search” type navigation drilldown

There’s a way to set custom post-type search. I can only head you in the right direction and answer the first part of your question. The other part about COOKIES you’ll have to review php documentation.

Also, I don’t know exactly what the other $_REQUEST variables you may have set for your custom post type.

But here’s a technique on how you can hidden input fields to set various post/get/request values.

I.E. Here is how you set which custom post type:

<form role="search" method="get" id="searchform" action="<?php echo home_url( "https://wordpress.stackexchange.com/" ); ?>">
<input type="text" name="s" id="s" value="Enter keywords ..." onfocus="if(this.value==this.defaultValue)this.value="";" onblur="if(this.value=='')this.value=this.defaultValue;"/><br />
<select name="post_type">
    <option value="">Choose Category:</option>
    <option value="">All Categories</option>
    <option value="post_type_a">Post Type A</option>
    <option value="post_type_b">Post Type B</option>
     <option value="post_type_c">Post Type C</option>
</select><br />
<input type="submit" id="searchsubmit" value="Search Help" />

Thus when you submit the value the search will add $_REQUEST['post_type'] to your search.

You can also do this with a hidden form:

<input type="hidden" name="post_type" value="your_post_type" />

and have javascript dynamically change the value of above field.

More on this:

So potentially you could just add another hidden field to limit your search with javascript etc.

Hope that helped!

Leave a Comment

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino