I need to make custom search for specific house projects in my new wordpress site.

enter image description here

It needs to have 4 dropdown lists - 1 [number 2] for categories and 3 [numbers 3,4,5] for tags.

Tags need to be defined within the code because from 13 tags on whole site, 4 are for one dropdown, 5 are for second one a 4 are for third.

Is there any option to do this?

I made the dropdown for categories with this tutorial: http://www.webstutorial.com/wordpress-multiple-category-search/content-management-system-cms/wordpress-cms and by including only categories that i need to:

<div><?php wp_dropdown_categories('show_count=1&include=4,5,6,7'); ?></div>

But WordPress doesn't have function like wp_dropdown_tags to make something like this with tags

On Codex ( www.codex.wordpress.org/Function_Reference/get_the_tags ) there is something like: function drop_tags() but this only works within the_loop() and lists all tags.

It needs to list defined tags, and search only by those that were chosen.

Hope you understand what i mean and have any solutions. Thanks in advance.


You can define any taxonomy in the arguments:

  • This seems to work. So simple to make and i was searching for hours. Thank you very much. – haRacz Sep 29 '12 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.