Inspiration For Creative Minds
Home » Labs » How to display posts for a specific tag on a WordPress page – solved  

Filed under Labs

If you want to show a specific post from a tag on a WordPress page here is one of the best solution. Copy below code into your WP page where you want to display posts from the particular tag. You need to replace the part “tag=Your-Specific-Tag” with your tag.

 
<?php query_posts('tag=Your-Specific-Tag'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="thumbnail">  
        <?php the_post_thumbnail(); ?>
        <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>  
        <p class="datetime"><?php the_time('l, F j, Y G:i'); ?></p>  
        <?php the_content('Continue...'); ?>  
        <div class="postmeta">  
            <p><?php the_category(', '); ?> - <a href="<?php the_permalink() ?>" title="Show Comments">  
        <span class="comm"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></span></a></p>  
        </div>
    </div>  
<?php endwhile; endif; ?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: