Hi I would like to show a list of tags used in a certain category, any tip?
Thanks in advance!
Hi I would like to show a list of tags used in a certain category, any tip?
Thanks in advance!
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
Hi
http://localhost/wordpress/?cat=12
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 http://wordpress.org/support/topic/238953?replies=1
<?php
//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
wp_tag_cloud('number=0&largest=12&biggest=12&unit=px&format=list&'.$tag_param);
?>
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!
This topic has been closed to new replies.