Impossible to get rid of tags after insertion and then deletion
-
Hi
I need tags to decide the display of certain elements depending on the post type. If I’ve never inserted the tag in the post the element is not displayed as it should. If I insert the tag, wishing the element to be displayed, it works as it should. The problem is when I do not want the element to be displayed anymore. I remove the tag, but the query still finds the tag associated with the post and displays the element nevertheless. How can I avoid it doing this?The query I use is the following
<?php $tags = 'show-gal'; // separate multiple tags with comma $numposts = '1'; // -1 for all $myquery = new WP_Query("tag=$tags&showposts=$numposts");?> <?php if($myquery->have_posts()) : ?> do my stuff <?php endif; ?>
Thanks for your help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Impossible to get rid of tags after insertion and then deletion’ is closed to new replies.