Displaying Listing Tags for a specific listing category

Hi all

This isn’t an error with the plugin, but I hope you may be able to help me with displaying Listing Tags from a specific listing category when using the Directory plugin.

I have come up with the following:

    <?php

    query_posts(‘listing_category=musician’:wink:;

    if (have_posts()) : while (have_posts()) : the_post();

    if( get_the_tag_list() ){

    echo $posttags = get_the_tag_list(‘

  • ‘,’
  • ‘,’
  • :wink:;

    }

    endwhile; endif;

    wp_reset_query();

    ?>

which lists all the tags, but includes several duplicates. Please can you tell me how I modify it to remove the duplicate tags?

I’ve tried the following tag cloud also:

query_posts(‘listing_category=musician’:wink:;

if (have_posts()) : while (have_posts()) : the_post();

$posttags = get_the_tags();

if ($posttags) {

foreach($posttags as $tag) {

$all_tags_arr[] = $tag -> term_id; //USING JUST $tag MAKING $all_tags_arr A MULTI-DIMENSIONAL ARRAY, WHICH DOES WORK WITH array_unique

}

}

endwhile; endif;

$tags_arr = array_unique($all_tags_arr); //REMOVES DUPLICATES

foreach($tags_arr as $tag) {

$includeTags = $tag.’,’;

}

$args = array(‘include’=>$includeTags);

wp_tag_cloud( $args );

but this doesn’t list out the tags from the Listing Category; but rather all post tags.

Any help will be much appreciated.

Thanks

R