How to List Posts in Customized Order
August 9th, 2010 by
As an “out of the box” behavior, posts in WordPress are ordered by creation date in descending order.
However, I came across quite a few cases in which there was a need to customize the order posts are listed in.
Those cases become even more often these days, due to the new custom post types feature that comes with WordPress 3.0 and provides a much easier way to use posts as other object types, such as to display a list of future events.
When displaying future events, you may want to customize the order these events are listed in, by importance and not by date.
Another common example is – rearranging excerpts to posts in your own custom order inside a featured post block (take a look at this demo page).

Like in many other tweaks in WordPress, you have 2 possible solutions – do a little coding or install plugins.
Use custom fields to assign index numbers to posts
The following example lets you customize the order posts that belong to category number 4 are listed.
Using custom fields, you can assign an index number to each of the relevant posts (in this case I called the custom field “priority”).
Then, write a query like the one below, and place it wherever you want to display these posts:
<?php query_posts('cat=4&orderby=meta_value&meta_key=priority&order=ASC' );
while ( have_posts() ) : the_post();
<h1><?php the_title();?></h1>
<div class="post">
<?php the_content();?>
</div>
endwhile;
wp_reset_query();
?>
Install a plugin that enables customizing posts listing order
An excellent plugin for this task is Postmash-filtered.
This plugin has 2 great features:
- You can filter the posts you’d like to reorder, by month or by category.
- The AJAX interface enables easy drag and drop of posts up and down to resort them as you like.
If you know of a third way or want to ask something, go ahead!
Additional resources

It’s usful idea. But the Postmash-filtered plugin hasn’t update to 3.x. Maybe we need another way to adjust the order.
Hi Mr Heisenberg, you’re right that the plugin has been tested only up to 2.8. However, it might still work on 3.0.1. Have you tried it on the newer version?
A third method would be to use the “AStickyPostOrderer” plugin for ordering your posts. I have used it on a few projects and it’s been working great. I also made a video tutorial about it here:
http://wpmodder.com/how-to-add-a-sticky-post-to-a-wordpress-category-archive-page-719.html
As referenced by your other commenter about the Postmash-filtered plugin, the AStickyPostOrderer plugin hasn’t been updated for 3.0.1 yet…it’s currently at 2.9.2 I think…but it still works for me:)
Thanks for the tip Adam. I installed this plugin on one of my blogs and it did the job well.
You should try the Post Types Order it’s away much better and no need to change any code to make the sort functional. Also support multiple taxonomies and custom post types
I will give it a try, thanks.
Beneficial post and thanks for sharing. A couple of points in here I have not thought about prior to, I want to use this moment to say that I genuinely like your weblog. It is been a good resource of information for me. Thank you so significantly!