WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Another sort of paging (previous - next) problem (11 posts)

  1. vkaryl
    Member
    Posted 7 years ago #

    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....)

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  3. vkaryl
    Member
    Posted 7 years ago #

    This is the working example from the category page:

    http://somesite.org/wordpress/category/general/page/2/
    Source displays:
    <div class="navigation">
    <div class="alignleft"><a href="http://somesite.org/wordpress/category/general/page/2/">&laquo; Previous Entries</a></div>
    <div class="alignright"></div>
    </div>

    This is the non-working example from indexnew.php:

    http://somesite.org/wordpress/indexnew.php/page/2/
    Source displays:
    <div class="navigation">
    <div class="alignleft"><a href="http://somesite.org/wordpress/indexnew.php/page/2/">&laquo; Previous Entries</a></div>
    <div class="alignright"></div>
    </div>

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

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

  4. Chris_K
    Member
    Posted 7 years ago #

    [small edit to kill that missed real url]

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Does http://somesite.org/wordpress/page/2/ take you to the real second page of the setup?

  6. vkaryl
    Member
    Posted 7 years ago #

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

    Handy: thanks....

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

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

  8. vkaryl
    Member
    Posted 7 years ago #

    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.

  9. vkaryl
    Member
    Posted 7 years ago #

    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.

  10. vkaryl
    Member
    Posted 7 years ago #

    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.

  11. dlakme
    Member
    Posted 7 years ago #

    I have the same problem. Please help!

    http://www.praguebuzz.com.

    Could you guy please show me how to fix it?

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic