WordPress.org

Ready to get started?Download WordPress

Forums

Why does the Loop ONLY work on one page? (4 posts)

  1. rugbert
    Member
    Posted 3 years ago #

    So basically, I want to have the loop on more than one page, so that way I can filter my posts differently for different pages.

    BUT it seems like the loop only works on the posts page. Is there anyway to have the loop on multiple pages? If I cant do this, Im going to have to change index.php to some lengthy if/else statement which calls different templates for the filtering right?

  2. MichaelH
    Member
    Posted 3 years ago #

    You can use the a loop in something like page templates. See the Page of Posts example in the Pages article.

  3. rugbert
    Member
    Posted 3 years ago #

    so the inline posts plugin? that just display's specific posts right? I cant have the loop work? Im trying to run different queries on different pages

  4. MichaelH
    Member
    Posted 3 years ago #

    There's plugins that allow shortcodes in a page content that display posts.

    You can use a php code plugin to put a query/loop in a page or post content.

    You can put a query/post loop in a page template, in a sidebar.php, almost any template.

    Lots of examples:
    http://www.google.com/search?q=wordpress+new+wp_query

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.