Forums

How to I get the WordPress loop in a page template? (6 posts)

  1. extrakun
    Member
    Posted 3 years ago #

    I wish to have a separate page template that functions like index.php where it would have access to the the WordPress loop. How to I achieve that?

  2. moshu
    Member
    Posted 3 years ago #

    Why do you need that? It might be better if you describe in plain ENglish WHAT is it that you want to achieve and leave the HOW to the helpers...

  3. extrakun
    Member
    Posted 3 years ago #

    Sorry if I was unclear with my intent.

    I wish to have different pages where posts from categories are displayed differently.

    1. One which is the usual style of index.php
    2. One which displays a list of child categories and at the same time display posts using thumbnails and just a short excerpt.

    Or rather, one is a blog-style, while the other is a CMS-style.

    I could achieve #2 with a static homepage - however, the question more or less remains - how do I obtain the WordPress with a static php-driven homepage so that I could generate news and etc.

    Thanks in advance!

  4. moshu
    Member
    Posted 3 years ago #

    Aren't Category_Templates doing exactly what you want to do with Pages instead?

  5. Otto
    Tech Ninja
    Posted 3 years ago #

    Why do people always want to use Pages for the wrong uses?

    Sigh.

  6. extrakun
    Member
    Posted 3 years ago #

    Thanks, that is exactly what I am looking for. Perhaps I should have phrased my question as "How can I have a PHP page that have the WordPress Loop".

    As for the prevalent issue of why I would think of using a page template to achieve what I want, I guess it's based on traditional method of building websites. Maybe including a link to the Template Hierarchy while explaining the WordPress Loop would help, something like "I wish to have a PHP page that has the WordPress loop"

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.