list category posts are not ordering any more

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)

Related posts

Leave a Reply

3 comments

  1. 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!

    Cheers~

  2. 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.