How Do I Fix The Sort Order Of My Posts?
Up until recently my blog has been displaying fine, as I wanted it, ordering the posts by post_date descending.
Today (may have been earlier since I don’t visit it every day) it started displaying the posts in ascending order by post_date. What happened?
I have looked everywhere in the Admin login and find no control over how the posts are ordered for display!
My blog is ourholm.com-slash-blog
There is no explicit control for that sort of thing. Post order is controlled by the theme, more or less.
So it’s not something that’s just going to “happen” all by itself. Have you been editing your theme lately? In particular, have you done anything with the
query_posts()functions? Look through your theme and see if it calls query_posts anywhere.
Or perhaps you installed some new plugins, no matter how unrelated they may seem to be to the problem at hand? You never know, with plugins..
Basically, nothing happens without a reason, so we need to find the trigger that started this problem in order to determine a) why and b) how to fix it.
I have not touched my blog since my last posting made about Thanksgiving time. It was fine then, now it’s screwed up. I have installed nor touched any code between that time (that post date and today.) The last plug-in I installed was done maybe 6-9 months ago, the anti-spam one… Akismet.
That didn’t affect it at that time.
I wonder if the host for my domain did some changes. They indicated recently that they were dropping support for PHP 4.x. They only support PHP 5.x so could that have cause this? They converted any PHP4 sites to PHP5.
Not seeing a solution yet. Anyone have any suggestions? Did going to PHP5 (no PHP4 support on my hosted site) break it?
“Did going to PHP5 (no PHP4 support on my hosted site) break it?“
Doubtful. I run WordPress on a couple locales with PHP5 just fine.
However, when I append the following to your blog’s url:
nothing happens (same with
?orderby=title). This is not what I expect to see if nothing else is going on in the background, either with a plugin or, as Otto noted, through query_posts().
Can you post up the source of the home page template for your theme (home.php, or if doesn’t exist, index.php) here:
And reply with the url you get there.
Sorry for the delay, yesterday was pretty busy.
Here’s the URL.
Theme is FallingLeaves
Just a thought:
I don’t see anything unusual in the index.php file. Try the header.php file, see if there’s something in there that’s odd.
However, monthly archives are not:
I’m thinking it must be a plugin or some kind of weird code in functions.php or some other theme files.
If it was me, I’d run a recursive text search on the whole blog for “ASC” and see what I came up with.
I have posted the header.php here:
How would you suggest I do a resursive search on the blog looking for “ASC”? My site is hosted by a service so I have FTP access.
The strange thing in all this is that I didn’t muck with the blog code in 1-2 yrs now. This change happened recently, like in the last month. I made one new posting since a year ago and that was right after THanksgiving.
I don’t understand why it would get scrambled in any way except for the PHP4 going away. Is this a MySQL mess up? I haven’t installed any new plugins in month and months and that was the Aksimet anti-spammer thing but it worked after that anyway.
Looks like moshu’s post referencing the exact same issue by someone in the UK may be the ticket… upgrade the blog. Ughh.
A have the exact same problem at mr-x.dk
Happened a week ago – using WP 1.5 – Haven’t touched a piece of code or plugins for 6 months.
I made a post and afterwards all posts were reversed.
I am having the same problem, and I likewise did not modify any code. After doing some diagnostics I have discovered that changing ?order to DESC does nothing, and the issue is only with query_posts. Alexmk, I notice by your site that you fixed the problem: How?? Please, any help would be great!
I upgraded to latest version of WP and the problem was fixed.
I’ve always thought that upgrading from WP 1.5 would be a pain but it turned out to be quite easy – just 45 minutes (and I made 3 different backups to make sure that I could restore the old site)
But I think that the problem of this thread is quite weird. I believe that thousands of WP-users have had this problem (I actually met a guy on the street the other day with the same problem). Someone must be able to explain what’s wrong with old versions of WP.
(How do I mark this thread “solved” ?
Thanks for the replay, alexmk, but upgrading did *not* fix the problem for me (I am running the newest version), so I am still looking for a solution. Please do not mark the thread solved.
- The topic ‘How Do I Fix The Sort Order Of My Posts?’ is closed to new replies.