Forums

A Way To Display a Tag "Feed" Within Pages/Posts (3 posts)

  1. sev1512
    Member
    Posted 5 months ago #

    Hi,

    We're looking for a way to display all posts (or just post titles and URLs) filed under a specific tag within a Page.

    For example, we're creating a page about Turtles. We're going to have some static information about Turtles at the top of this page, and under it we want a dynamic stream of posts related to our Turtles tag to show up on this page under the static information.

    Is something like this possible through a plugin, or a HTML code?

    I've searched and have been unable to find anything like it.

    Thanks in advance for your help.

  2. Jonas Grumby
    Member
    Posted 5 months ago #

    You can do it with query_posts.

  3. Jonas Grumby
    Member
    Posted 5 months ago #

    Something like:

    <?php
    //The Query
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('posts_per_page=5&tag=turtles&paged=' . $paged);
    //The Loop
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    
    ?>

    could be placed in a php template called page-turtles.php

Reply

You must log in to post.

About this Topic