Hi there,
This question is related to a question I posted up yesterday (that was resolved). I'm really stuck on this and if anyone could help me out it would be immensely appreciated:
Basically the following script displays:
First half - posts that have more than one tag associated with them
Second half - all posts single tags.
My query is, how do I then exclude the the tags already displayed in the first half from the second half. Therefore displaying only posts that have one tag associated with them.
<?php
$tags = get_tags( array('orderby' => 'name', 'order' => 'ASC') );
foreach ( (array) $tags as $tag ) {
$post_tag = get_term($tag, 'post_tag' );
$args=array('orderby' => 'date', 'showposts' => -1, 'tag__in' => array($tag->term_id), 'caller_get_posts'=>1);
$posts=get_posts($args);
if ($post_tag->count > 1) {
//Display posts with more than one tag
} else if ($post_tag->count == 1) {
//Here I am trying to display posts with only one tag
}
}
?>
Thanks!