Support » Plugins » Display Posts As Ascending Order in Admin Panel

  • Resolved Ian

    (@ianaleksander)


    I want to be able to see my posts with the oldest listing first (at the bulk edit post view), since I’m using wordpress for database management not standard blogging. Is there a way to do this easily? I’ve searched a lot but can’t seem to find it. It works fine on my public page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ian

    (@ianaleksander)

    Perfect, I just changed the plugin to say date and it worked!

    <?php
    /*
    Plugin Name: Set Post Order In Admin
    Version: 0.1
    Plugin URI: http://wordpress.org/support/topic/336715/
    Description: In Posts->Edit, display posts in date order.
    Author: MichaelH
    Author URI: http://codex.wordpress.org/User:MichaelH/MyPlugins
    */
    
    function set_post_order_in_admin( $wp_query ) {
      if ( is_admin() ) {
        $wp_query->set( 'orderby', 'date' );
        $wp_query->set( 'order', 'ASC' );
      }
    }
    add_filter('pre_get_posts', 'set_post_order_in_admin' );
    ?>
    SantaSativa

    (@santasativa)

    Thank you ianaleksander, I was looking for something like this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Posts As Ascending Order in Admin Panel’ is closed to new replies.