Order by arbitrary date
-
Hi, I am converting a static website to a wordpress site, and one feature on the site is a lot of weekly postings that go back a couple of years.
All these posts have to make it into the database to be displayed in chronological order. However, the default orders them by chronological order for the <i>post date</i>. So I thought about ordering it alphabetically by the title, but this quickly turns the title into something ugly:
<?php $posts=query_posts($query_string . ‘&orderby=title&order=des’);
if (have_posts()) : while (have_posts()) : the_post(); ?>I can only get it to work with a title like, “2008-09-10 Post Title.”
I would like something a little more readable, like “September 10th, 2008 – Post Title.” But then the months screw everything up.
Going back from the beginning and entering them chronologically isn’t an option either. By the time they were all entered, I’d have an extra 2 months to catch up on, and if they ever want to post even OLDER stuff, then I’m screwed.
Is there a way to do this? Other than copying/pasting from the codex, I’m not real strong with MySQL/PHP, so please use simple explanations!
- The topic ‘Order by arbitrary date’ is closed to new replies.