WordPress.org

Support

Support » How-To and Troubleshooting » Next/Previous on Page w/ queried posts

Next/Previous on Page w/ queried posts

  • How can I make the “next/previous posts”-navigation work with a Page that is filled with queried posts?

    At the moment my homepage is an ordinary index.php displaying posts as I want it. But I want to change that to make it a real starting page for more than a blog, I created a page “blog” that you find under http://katzenbach.info/blog. This page is supposed to act like the original index.php, so I put a query beforen the loop to make it display posts instead of the (non-existent) content of the page. Everything is fine. Is displays everything as I want it to be.

    But: When clicking on “previous entries” I am directed to http://katzenbach.info/blog/page/2/ and this produces a 404 error.

    Any ideas how to fix that? Or is this kind of nvaigation not possible with pages (can’t believe that)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • See Creating a Static Front Page for information on how to do this. Pages do not have navigation like posts and multi-post views. When you view Pages, you are looking at only one.

    Lorelle, thanks for your answer. But I’m not really sure if that is what I want.

    If I go this way (the one w/o moving WP but only index.php), I could have:
    – a static front page with WordPress Integration. That’s fine.
    – I would move index.php to a folder called /blog, so I have the flexibility of index.php at http://katzenbach.info/blog

    But I am not really sure about the implications. Does that change the Feed-URL or the URLs of other pages like “Contact”? I do not want them to be http://katzenbach.info/blog/contact, they must stay in this form: http://katzenbach.info/contact.

    I’ve tried it and it didn’t work.

    What I did:
    – I moved index.php to a new folder called /blog
    – I changed the Blog URI in the Admin Panel to this directory
    – I don’t care for the now plain front page. I could fix that later

    The problem was: the other pages. WP changed their URL to ../blog/PAGENAME, I want them to stay ../PAGENAME. And they couldn’t be reached at either. The Feed seemed to stay at ../feed.

    So the problem stays.

    What I have and what I want:
    – WP is installed in ..
    – I want the blog posts be seen at ../blog and have page navigation (see firts post of this thread)
    – I want pages (created by WP) at ../PAGENAME
    – the front page will be filled with snips of posts and other stuff. But that is not the problem now.
    – The feed URL shall stay at ../feed

    Any ideas how to achieve that? (Another thing I tried was just multiplying index.php to the directory /blog. But that produces a 404 error for /page/2/ wih page navigation.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Next/Previous on Page w/ queried posts’ is closed to new replies.
Skip to toolbar