Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Taxonomy Dropdown Question WordPress


Hi All,

I asked another question related to this -

But I have thought of another solution that would fix my problem.

I need to replace the show_option_all (which show all my taxonomies),


a command to show three taxonomies (ID 14, 15, 16) and label this 'all'

Basically, when someone selects 'all' i only want to show the results of the three taxonomies above.

Note: i cant exclude the taxonomy from the search results as it will effect another search form.

Please help!

My current code is below:

//property types drop down
if (isset($_GET['property_types'])) { $category_ID = $_GET['property_types']; } else { $category_ID = 0; }
if ($category_ID > 0) {
//Do nothing
} else {
$category_ID = 0;
$dropdown_options = array (

'show_option_all' => __(get_option('woo_label_property_type_dropdown_view_all')),
'hide_empty' => 0,
'hierarchical' => 1,
'show_count' => 0,
'orderby' => 'name',
'name' => 'property_types',
'id' => 'property_types',
'taxonomy' => 'propertytype',

'exclude' => '',

'hide_if_empty' => 1,
'selected' => $category_ID,
'class' => 'last'


Answers (2)


Peter Michael answers:

How do you use $dropdown_options ? Can we see the function which builds the dropdown?


Khanh Cao answers:

How do you differentiate the search forms and their result pages?

On your desired search page, check if the cat id is '0' and change the query vars to include only those IDs.

To display a drop down that exclude those IDs out, it's better to create a new Walker class.