How to create WP Search Form with Category and Sub category
for illustration a search form (for search title Book=title post)
With condition By Keyword, By All Category and Sub Category selected
Where, Sub Category (CD, PDF, EPub,…)
I Look Around for a Week but unsuccessful,
Help me , Please …
=> For My Client blog for CMS Ebook
I Have modified my form like This :
<?php $media = array(
'hierarchical' => 1,
'parent' => get_cat_id('Media'),
'show_option_none' => ('All Media'),
'hide_empty' => 0 );
?>
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<div>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
<?php wp_dropdown_categories('show_option_none=All Category'); ?>
<?php wp_dropdown_categories($media); ?>
<input type="submit" id="searchsubmit" value="search" />
</div>
</form>
How to Create Function or modified form again ? Without Plugin…
For a detailed answer I am very grateful !!!
First you have to give your dropdown names so:
Then create you search filter