I have the wp_dropdown_categories function in my searchform.php file. Right now it lets the user choose what post category they want to search in.
Is there a way I can get the drop down to include a custom taxonomy and a custom post type?
For example if I have a custom post type for galleries, and a custom taxonomy for places… how can I display a wp-dropdown that lets the user choose to search either “photos” or “locations”?
You should be able to send the desired taxonomies as an argument to the function. This is untested, but should work:
For your reference, the function
wp_dropdown_categories
is defined in “wp-includes/category-template.php” on line 301. Take a look at it as it will help you understand what you can send as arguments for the function.