[Plugin: Relevanssi – A Better Search] Dropdown category search: How to set default category?
-
Thanks for this awesome plugin. It’s exactly what I was looking for and more!
I’m using this code from the FAQ to implement a dropdown search:
<form method="get" action="<?php bloginfo('url'); ?>"> <div><label class="screen-reader-text" for="s">Search</label> <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <?php wp_dropdown_categories(array('show_option_all' => 'All categories')); ?> <input type="submit" id="searchsubmit" value="Search" /> </div> </form>
What code would I use to replace the “All categories” default with a default category?
I looked through the codex and can’t figure out what to replace on the following line:
wp_dropdown_categories(array('show_option_all' => 'All categories'));
Thanks,
Matt
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Relevanssi – A Better Search] Dropdown category search: How to set default category?’ is closed to new replies.