Support » Themes and Templates » The Loop in index.php .vs page-template.php

  • Roger

    (@rogermcphersondiamond-mnet)


    Can anyone tell me the difference between how WP processes The Loop in the page declared as the “Posting Page” using the default page template (index.php) and a custom template page that is not the “Posting Page”?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The basic Loop itself is no different. What is different is the query sent to the database and, therefore, the objects that are returned for processing by the Loop. In your main posts page, it will be posts in date order. In a custom page template, it will be the content of a single Page.

    Does that help?

    Thread Starter Roger

    (@rogermcphersondiamond-mnet)

    Esmi,

    Yes, thank you. Can you tell me how I can send the query for all the posts on a page that is not my posting page?

    Thanks again,

    Roger

    Thread Starter Roger

    (@rogermcphersondiamond-mnet)

    Esmi,

    Never mind. I figured out a work around. I’ll just set the $query_string to the name of the posting page.

    Thanks,

    Roger

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The Loop in index.php .vs page-template.php’ is closed to new replies.