Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cat_id = get_query_var('cat');
- query_posts('posts_per_page=-1&cat='.$cat_id);
- if (have_posts()) :
- $posttags = array();
- while (have_posts()) : the_post();
- if( get_the_tag_list() ){
- $posttags = array_merge( $posttags, explode('||', get_the_tag_list('','||','')));
- }
- endwhile;
- $posttags = array_unique( $posttags );
- sort($posttags); //sort optional
- if( $posttags ) {
- echo '<ul><li>';
- echo implode("</li>\n<li>", $posttags);
- echo '</li></ul>';
- }
- endif; wp_reset_query();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement