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


Late answer

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

  • Just adding, yes. This is the way to use this.
    – erwstout
    Oct 30 '15 at 18:40
  • 1
    Right answer but, you know...you should put an example for users passing by searching for the correct solution :)
    – Erenor Paz
    Mar 15 '17 at 15:13

Maybe this is late but thinks it will help someone. This is the code that gives you tags list for specific category

$terms = get_terms( array(
'taxonomy' => 'post_tag',
'hide_empty' => false,
) );

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.