Posts displaying in wrong order…but only on main page
-
I’m in the process of putting together my first WP site. I’m using the “Autumn Concept” theme, with a few modifications. I know nothing about php, but after a few hours’ googling have managed to achieve the desired result…almost.
The main change I have made is that I’ve created a specific category called “news”, and excluded any posts assigned to that category from the main page; I have also created a static page called “news”, which only displays posts assigned to the “news” category. Both these changes work OK in terms of only showing the posts they should.
The problem comes with post order. On the “news” page, the two test posts I’ve created are shown in the correct order – i.e. most recent first. But on the main page, my two test posts show in reverse order (oldest first). I’ve done some digging around and found references in WP forums to a MySQL bug – but that wouldn’t explain why this is only happening on the main page and not the “news” page.
Finally, I’ve tried to correct this by putting a “query_posts” statement at the start of the loop in the main page (index.php) that sets the sort order to descending. It doesn’t make any difference. (Maybe because I’ve already inserted a “query_posts” statement to exclude posts in the “news” category?)
Probably easier to see if you have a look at the site: here.
Fingers crossed someone can tell me how to change this…thanks in advance.
Rob
- The topic ‘Posts displaying in wrong order…but only on main page’ is closed to new replies.