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'm displaying all posts by category in my template and i was wondering: is it possible to get a list of all tags used by that category?

i only found out how to make a tag-dropdown but it's from all articles, i couldn't find out yet how to filter it by category - any ideas?

here's the link http://wphacks.com/how-to-display-wordpress-tags-dropdown-menu/

thx in advance

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

This shows you how to get tags for a category:

http://www.wprecipes.com/wordpress-trick-function-to-get-tags-related-to-category

share|improve this answer
1  
That code example is not compatible with wordpress blogs that have a different table prefix than wp_ :/ –  hakre Mar 21 '11 at 13:43
    
To fix that, you can manually replace all instances of wp_ in the sql with $wpdb->prefix. –  imHavoc Mar 21 '11 at 19:54
add comment

Late answer

There's get_terms() here for that. No need for any custom queries.

share|improve this answer
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.