Support » Requests and Feedback » Bug in index.php – doesn’t “posts paged”

  • What’s going on with the “posts paged” option? I set my reading option to 10 posts paged … and it doesn’t seem to “page” anything. I’m using the default index.php.
    Then, I go on the IRC channel, and people tell me I have to add code to make it work? What’s going on?

Viewing 15 replies - 1 through 15 (of 17 total)
  • <?php posts_nav_link() ?>

    The problem with <?php posts_nav_link() ?> is that it generates invalid code (lonely ampersands) for monthly archives. You get:
    instead of:
    And that is both invalid, and crashes the blog in XML mode.
    p.s. Hello, Sush.

    Jaykul, the posts_paged is only for posts, by default, like if you have a long post, you can page it, usually does.
    To get everything else to page, you have to get ‘s paginate plugin.

    What was the last post about? Jaykul? Was it an error you got or something?

    Heh, yeah! Hopefully the edit clears things up. I’m still convinced that “posts paged” is the same as “posts.”

    Jaykul, it reads show most recent 10 posts or days or 10 individual-posts-each-split-up-as-pages.
    The following post is an example of a paged post

    Uhm. This an example of a paged post:
    And I have my settings set to “posts” now because it makes no difference

    post paged option make that tag give previous page next page links.
    and they are outside the loop.
    i think you are looking for page numbers for a single post :p

    Shushubh: I believe you! (I think)
    My point is: You have to add code to index.php to make that happen. So the feature ships broken. When a (new) user changes that option, NOTHING happens. They have to go find out that they have to put “posts_nav_link()” _INSIDE_ the content div …

    Setting posts_paged as an option enables one to use
    the posts_nav_link() tag to display post navigation on index.php, without posts_paged being set, putting posts_nav_link() on your index.php will have no effect (won’t produce the “previous”, “next” nav links).
    Cleared this up after a small experiment 🙂

    I had this same issue. I couldn’t figure out why the site wouldn’t page when the option was on, but eventually stumbled across the nav tags.
    Yeah, so… Shouldn’t it ship with the code in and the option off as opposed to the code out and the option on?

    hmm this tag is a good candidate to appear in default template….. 🙂

    Well, I made it work on my site, in my own personal, but extremely immitable, way.

    If it helps, I have posted a diff to allow permalinks to be used along with posts_paged:
    Thanks for mentioning the missing posts_nav_link() call – I was wondering what I was doing wrong, and would second the suggestion to place this line in the default index.php file (deciding between posts and posts_paged as a default setting is not something I have an opinon on).


    Hmm, just read the source of Jaykul’s plugin, and I think I prefer it over the above diff, mainly due to the way permlinks will look afterwards…
    Wish I’d looked at the code before I started messing around with stuff.
    Oh well.


Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Bug in index.php – doesn’t “posts paged”’ is closed to new replies.