Displaying posts from multiple tags?
-
I’ve come up with an idea that might be kinda neat, but I’m not sure if this could even work. Basically, I want to call up certain tags on a page and display the last 4 posts belonging to that tag. I’ve been looking around but the only useful thing I could find was the Multiple Loops trick in the Codex. This is more or less exactly what I want, but I want to use Tags, not Categories.
This is how I imagine (butchered) the code would look, based upon the Codex example so that the last 4 posts with the special_tag tag will be displayed:
// going off on my own here <?php $temp_query = $wp_query; ?> <!-- Do stuff... --> <?php query_posts('tag_name=special_tagt&showposts=4'); ?> <?php while (have_posts()) : the_post(); ?> <!-- Do special_tag stuff... --> <?php endwhile; ?> // now back to our regularly scheduled programming <?php $wp_query = $temp_query; ?>(Keep in mind that I know this code will absolutely not work, it’s just how I imagine it might.)
Can anyone help me with this? Or is this just a stupid idea and should I shut up and use Categories?
Thanks!
-Austin
The topic ‘Displaying posts from multiple tags?’ is closed to new replies.