WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: postMash (filtered) - custom post order] How to reverse the post order for the admin part (2 posts)

  1. anemo
    Member
    Posted 3 years ago #

    Hey!

    This is actually an answer to a question about this plugin that I solved on my own and I think that it would be a good idea to share the info.

    To reverse the order of the posts in the admin part, modify these lines in postMash.php (postmash-filtered v.1.2.1) to:

    Line 71:
    $query_post .= " AND $wpdb->posts.post_type = 'post' ORDER BY menu_order ASC ";

    Line 76:
    $query_post .= " ORDER BY menu_order ASC " ;}

    (Add ASC in the end of the query string)

    Now you will have the newest posts on top and the oldest ones down the bottom. This can be quite handy if your posts has this order on your site.

    Thanks for a GREAT plugin!

    http://wordpress.org/extend/plugins/postmash-filtered/

  2. anemo
    Member
    Posted 3 years ago #

    Sorry, I messed up and wrote ASC instead of DESC. Use DESC instead to reverse the order of the posts:

    Line 71:

    $query_post .=	" AND $wpdb->posts.post_type = 'post' ORDER BY menu_order DESC ";

    Line 76:

    $query_post .= " ORDER BY menu_order DESC " ;}

Topic Closed

This topic has been closed to new replies.

About this Topic