Support » Fixing WordPress » Display all tags for a category

Viewing 6 replies - 1 through 6 (of 6 total)
  • You will need a plugin for that. Not sure there is one yet.

    did you ever figure this out? I am trying to do this also


    how to get the query parameter value “cat=3”?
    please help me.

    Thanks. Sai

    Hi, i’ve been looking for this for ages and i think i just found the solution.
    I’m only using wp_tag_cloud() which is already available in wordpress.
    I got the idea from

    //the id of the category you want
    $category_id = 4;
    $post_ids = get_objects_in_term( $category_id, 'category' );
    $tag_ids = wp_get_object_terms( (array) $post_ids, 'post_tag', array('fields' => 'ids') );
    $tag_param = '';
    if ( ! empty($tag_ids) ) {
    //change 'include=' to 'exclude=' to achieve the opposite..
    $tag_param = 'include=' . implode(',', (array) $tag_ids );
    //format the output using wp_tag_cloud parameters

    the only thing missing is the post count in a bracket at the end of each tags..

    I’d like to try your solution, can you tell me where I would put that code?

    thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display all tags for a category’ is closed to new replies.