Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You can define any taxonomy in the arguments:

wp_dropdown_categories('taxonomy=post_tag');
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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