Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t know of plugins for this, but it is pretty easy to put in a template, just by creating your own loop at the bottom. Something like this is all you need:

    <?php
    $myTaggedPosts = new WP_Query();
    $myTaggedPosts->query('tag=chocolate');
    ?>
    <ul>
    <?php while ($myTaggedPosts->have_posts()): $myTaggedPosts->the_post();?>
    <li><a href="<?php the_permalink();?>"><?php the_title();?></a></li>
    <?php endwhile;?>
    </ul>
    Thread Starter chris2006

    (@chris2006)

    That’s a great help thanks taffeljohan!

    what would be a good solution to achieving this for multiple pages – with multiple tags?

    Using conditionals for the pageID?

    Sounds like a plan, if there aren’t too many. Otherwise it will be a pain to hard code everything. Otherwise you could use custom fields on the pages to store parameters (tag names, for instance).

    By the way, it should have been
    $myTaggedPosts->query_posts('tag=chocolate')
    (i left out the _posts part)

    I take back that last correction! There is no query_posts method in WP_Query. I was right the first time.

    Thanks. Ill give that a try at https://lime.wire-2008.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add tagged posts to wordpress page’ is closed to new replies.