• I’ve been working on a custom theme for my wordpress site.

    I’m trying to create a new page template for some of my pages.

    When doing this, I noticed the Loop used to display the page. But why is this? The Page should just be a single record, so why the need for the loop?

    I’ve tried to find examples of a page template that doesn’t use the loop, but was unable to.

    Is this just the way it’s done?

Viewing 1 replies (of 1 total)
  • >>The Page should just be a single record, so why the need for the loop?<<

    because the Loop is a function that calls in that single record (and it’s corresponding info) form the database – so you don’t have to write a huge custom function to pull it out yourself. You *can* if you so desire, but it’s already done for you so you don’t have to. If you don’t use the Loop, and you don’t write your own function to pull the data, then nothing will appear on the page.

Viewing 1 replies (of 1 total)
  • The topic ‘Why does a ‘Page’ need to have the Loop?’ is closed to new replies.