Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ewdicus

    (@ewdicus)

    Thank you again for the help. I haven’t had time to try this yet but I’ll post when I do.

    In my opinion, something like this needs to be common information. I’ve seen other people post this problem, but there is either no solution posted or one that doesn’t work for me. If I can get this to work, I’ll try to distill the process to something manageable and slap it into the codex.

    Thanks again,
    Elliott

    Thread Starter ewdicus

    (@ewdicus)

    Okay, I looked at what you wrote again.

    No, I’m not trying to redirect to a different page to handle the rest of the posts. I’m trying to do it all on the index. Is this wrong?

    Thanks

    Thread Starter ewdicus

    (@ewdicus)

    I’m not sure what you’re asking. All the code I’ve posted is from the top of my index.php page.

    I just want it to always show one post, with previous and next buttons to navigate through posts. I know it would do this if I set the reading options to “show at most 1 post” but that would affect the whole site, which I do not want.

    Thanks for the replies,
    Elliott

    Thread Starter ewdicus

    (@ewdicus)

    Okay, I’ve narrowed this down.

    My blog is still in testing so I only have 3 posts. In the “reading” settings I have “Show at most 10 posts”. I think what’s happening is this:

    WordPress is getting a request for page/2 when it thinks that all the posts should fit on one page – so, it’s giving a 404.

    If I change to “Show at most 2 posts”. It works…until you try to view the 3rd post. So, wordpress expects “page/2” now, but not “page/3” and it gives a 404.

    So what is the solution here? It’s like I need to catch it before it looks to see if there should be a “page/whatever” and decide, based on the number of posts, what to show.

    Thanks again,
    Elliott

    Thread Starter ewdicus

    (@ewdicus)

    I took a further look at the “Example 3” you referenced, and explicitly used it. It also causes the pagination problem. I’ve tried so many “solutions” I don’t know what to try next. If anyone thinks it’ll help, I’ll post my whole index.php

    Thanks,
    Elliott

    Thread Starter ewdicus

    (@ewdicus)

    Thanks for the reply!

    If that has any effect I’m not seeing it. I’m now using this:

    <?php if (is_home()) {
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("posts_per_page=1&paged=$page");
    } ?>

    And as you can see, I’m still getting broken links. Any other ideas?

    Thanks again.

Viewing 6 replies - 1 through 6 (of 6 total)