Display Posts within a Page using The Loop (4 posts)

  1. grough
    Posted 8 years ago #

    I'm using WordPress Pages as a CMS. Pages are being used for content and Posts for "news items".

    I've set up a special Page template for the front page that displays some content, and underneath this I'm trying to show a summary of the news items by calling The Loop in the home page template.

    However, when I call The Loop to list news Posts, it only returns the current Page. Is there some way I can get The Loop to run in a Post context? I'm new to WordPress, and it appears that what The Loop returns depends on the page context.

    Is this correct? How can I override it?

  2. moshu
    Posted 8 years ago #

    This might help.

  3. Chris_K
    Posted 8 years ago #

    bookmarked :-)

  4. Mistainu
    Posted 8 years ago #

    wow i've been trying to figure it out for weeks! awesome solution.

    <?php $temp_query = $wp_query; ?>
    <?php query_posts('showposts=12'); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic