• Hi all. New here… πŸ™‚

    I don’t understand the relationship between “the loop” and “static” (meaning just unchanging) pages. I searched the interwebs all day yesterday trying to understand why if I create for example a front-page.php file and try to display such “static” content there it never works unless a loop exists, and yet the loop is checking for posts. But I want to display only custom a page, no posts there. If somebody could explain this basic thing in detail I’d much appreciate it. Is there a template tag(?) for fetching such content without a loop. Or does that make sense??

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • yet the loop is checking for posts

    ‘posts’ is only a cover-word which includes various post_types such as ‘post’, ‘page’ and more … (which one of them is used in your template will be determined automatically by the core functions).

    best to keep the loop even for a template designed to show just one static page.

    Thread Starter samashley

    (@samashley)

    Thanks. I figured it must be like that after reading seemingly zillions of pages of codex, tutorials, etc. It’s confusing, frankly, but I suppose it’s like that partly because wp started out as strictly for blogs then grew to include non-blog sites(???) Anyway thanks, I’ll keep that loop then.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is the loop necessary for display of pages???’ is closed to new replies.