[wp-trac] Re: [WordPress Trac] #6513: Older/Newer Post error in
classic Theme
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 15 16:41:58 GMT 2008
#6513: Older/Newer Post error in classic Theme
-----------------------------------+----------------------------------------
Reporter: private_meta | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone: 2.5.1
Component: Template | Version: 2.5
Severity: minor | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+----------------------------------------
Comment (by Otto42):
Replying to [comment:2 stevegk]:
> Reading the codex entry
http://codex.wordpress.org/Next_and_Previous_Links the patch also goes
against the documentation. It seems that the function is returning next
results when it should return previous results and vice versa.
No, the codex was just wrong/confusing. I fixed it.
Basically, the problem is that "previous" and "next" are not referring to
chronological time, they are referring to pages and post ordering.
Post ordering is arbitrary. It defaults to "post_date DESC", but it can be
anything, really. If you change the query_posts to put it in ASC ordering,
then the oldest post will show up first, and the previous/next links won't
change. Oh, they'll point to different posts, but they'll still point to
the previous/next posts in the given ordering.
"Next" refers to the next post in the given ordering, whatever it may be.
By default, "next" = "older posts". This is admittedly confusing if you
think of next as forward in time, but it is actually forward in the
returned set of posts from the database, whatever order they may be in.
--
Ticket URL: <http://trac.wordpress.org/ticket/6513#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list