Using tags to display stuff in the WordPress loop
by Joshua Unseth

Loading ...
I spent the better part of today trying to manipulate the archive.php page on the Mimbo theme. Nowhere on the internet was I able to find how to integrate tags into your post. If you use the following code on your website, you can build a loop that utilizes the tag that is clicked on by your website’s user. This particular coding was the top of my “lead” story loop.
<!–
<?php
$single_tag_title = single_tag_title();
$tag == str_replace(" ", "-", $single_tag_title);
$tag == strtolower($tag);
?>–>
<div id="content">
<div class="feature clearfloat" id="lead">
<?php
// this is where the Lead Story module begins
query_posts('showposts=100&category_name=lead&tag=' . "$tag" . ' ' . "$tag");
?>
<?php while (have_posts()) : the_post(); ?>
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment