Support » Fixing WordPress » Another sort of paging (previous – next) problem

  • Resolved vkaryl


    I’ve got a client site which I’ve set up with home.php as landing page (non-blog: the overview for the site, but using wp’s sidebar, header, footer – just no posts). Due to the readership on this site, it’s really necessary to have the “main” blog open from a sidebar link – and you can’t link to index.php because that becomes a loopback to home.php. (The readership is not going to get the categories clickthrough which is why the whole “normal” main blog needs to open from the sidebar link.)

    BJ/kickasswebdesign suggested renaming index.php to indexnew.php – which works like a charm. Except….

    The paging at the bottom (Previous Entries – Next Entries) doesn’t work. Clicking reloads the same page with the number of posts selected in admin redisplaying. So the same 5 posts display when Previous Entries is clicked.

    Once you access a category, the paging works perfectly. And no, I’m not using any multiple loops or query post statements in this site.

    Anyone have any bright ideas here? (Thanks again to pizdin_dim for saving my sanity on the LAST problem with this site – and I don’t have permission to link to it, sorry…. the client’s not willing to have it public yet….)

Viewing 10 replies - 1 through 10 (of 10 total)
  • What do the previous and next links actually look like? Both the working and non-working ones, please. You can leave out the domain if you want.

    This is the working example from the category page:
    Source displays:
    <div class="navigation">
    <div class="alignleft"><a href="">&laquo; Previous Entries</a></div>
    <div class="alignright"></div>

    This is the non-working example from indexnew.php:
    Source displays:
    <div class="navigation">
    <div class="alignleft"><a href="">&laquo; Previous Entries</a></div>
    <div class="alignright"></div>

    Disabling the home.php page allows it to work correctly with index.php, the link shows this:
    Source displays:
    <div class=”navigation”>
    <div class=”alignleft”>« Previous Entries</div>
    <div class=”alignright”></div>

    And if that’s not what you needed please let me know. Thanks!

    [small edit to kill that missed real url]

    Does take you to the real second page of the setup?

    Otto: only if home.php is out of the loop.

    Handy: thanks….

    Hmmm.. How are you forwarding it to home.php, exactly?

    Home.php is set up using the template hierarchy wherein if a home.php is found in the theme folder that’s the page which will load first. Now normally one doesn’t need the “normal” blog display, because there are cat links in the sidebar – but with this group of users, they’re not going to get that. They really aren’t.

    So it’s not “forwarding” to home.php precisely. What I need is for a link from home.php to Blog Posts to open what would be the “normal” index.php for the blog.

    And that does work fine by renaming index.php to something else. But then the paging doesn’t work.

    Short run: I’ll just reframe the whole thing exactly the way it lays right now, without using “home.php” from within wp. Easy enough to do using the require call to wp-blog-header.php; certainly not the preferred mode however, and a kludgy workaround – again.

    Long run: this sort of thing needs to be sorted. The paging situation is totally balls-up if you use multiple loops/query post strings/home.php with call to “normal blog”. So someone on the dev side should figure out how to fix it.

    I’m marking this resolved. I did make the current site “work” by using the previously-stated workaround with calling wp-blog-header.php from the site index.php file, and linking to the blog from the sidebar.

    But the devs really need to figure out how to make paging work with situations like this and those listed in my previous post.

    I have the same problem. Please help!

    Could you guy please show me how to fix it?

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Another sort of paging (previous – next) problem’ is closed to new replies.