WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not sure if this started with the latest upgrade (didn't notice it until yesterday), but the lists are no longer ordering by either asc or dsc. Doesn't matter which I chooose, or which list, they have all stopped ordering alphabetically. (I use orderby=title order=asc)

share|improve this question

closed as off-topic by toscho Dec 12 '14 at 12:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

While Xufyan's answer will get the job done, it does cause your page loads to run an extra query and you might get some unpredictable behavior. Furthermore, it doesn't get to the root of your issue.

If you're comfortable with PHP, open up your theme's functions.php file and enter this:

add_filter('request', 'order_posts_by_title', 999 );
function order_posts_by_title( $request ) {
    mail('your@email.com', 'WordPress Debugging', print_r($request,1));

And load up the offending lists and see what it emails you (be sure to check your spam). If order and orderby are set, you probably have a plugin (or your theme) interfering. If they aren't, you can set your defaults by adding this to your functions.php file or by making it a plugin for use across multiple themes:

add_filter('request', 'order_posts_by_title', 999 );
function order_posts_by_title( $request ) {
    if ( ! isset($request['orderby'] && ! isset($request['order']) ) {
        $request['orderby'] = 'title';
        $request['order'] = 'ASC';
    return $request;

Let me know how you make out!


share|improve this answer
I'm not sure that either of these answers is related to the fact that these lists are based on the use of the plugin "list category post". Your answers look to be based on just creating a category list page - which is not what I am doing. The plugin creates that page for me and up until now has always sorted alphabetically. Perhaps it is a plugin conflict - but the only new plugin since this happened is related to you tube use - so not sure why that would cause an issue. – rweiss Jan 25 '12 at 17:35
My suggested code was to help you debug what the issue might be. But, you're right, I didn't address the plugin specifically so that made it a confusing answer; sorry for my lack of clarity. I installed this plugin on a clean system and it works great for me using the latest version of both WP and the plugin and using the shortcode [catlist id="1" order="asc" orderby="title"]. Since it's working perfect for me on a clean system, it's most likely that another plugin or your theme is interfering. If you run my first code block, it should give you a clue if that's the case! – Matthew Boynes Jan 25 '12 at 17:58
I get you now. Yes, it appears my dear clients have been messing with categories and now have some kind of duplicate mess going on. At least according to the email I got. – rweiss Jan 25 '12 at 19:38

you can use query_post in order to order the list according to your requirement,

have a look,

global $query_string;
query_posts( $query_string . '&order=ASC' );

If you must use query_posts(), make sure you call wp_reset_query() after you're done.

to know more about query_post, have a look here,


share|improve this answer

Found the issue. The plugin Post Types Order has an option that must be checked for it to work in Custom Posts. But that option - when on - overtakes the ordering process.

So, it was a plugin conflict, and I have to choose between one or the other.

Thanks for the help.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.