WordPress.org

Forums

Admin Management Xtended
[resolved] Post Order - Direct Input not working (8 posts)

  1. Haz
    Member
    Posted 1 year ago #

    Hi, I'm using Admin Management Xtended and I like the plugin very much.

    But I'm having problems with getting the post order to work. I am in Direct Input mode and I punch the numbers in to the fields it seems to register inside wordpress but when I check my blog page, the posts don't reorder.

    Any information would be helpful.

    Thanks!
    http://www.aquariumcarebasics.com

    http://wordpress.org/plugins/admin-management-xtended/

  2. wpseek
    Member
    Plugin Author

    Posted 1 year ago #

    Hey tvguy2000,

    I think this is a template/theme "issue". In your theme's index.php file search for something like query_posts or WP_Query or get_posts and change the orderby parameter to 'menu_order'. Default is 'post_date'.

  3. Haz
    Member
    Posted 1 year ago #

    Thanks for getting back to me Oliver. I looked in index.php and throughout my theme (TwentyTwelve) and I did not see what you mentioned above. Any ideas where I can find it in TwentyTwelve?

  4. wpseek
    Member
    Plugin Author

    Posted 1 year ago #

    Hey,

    okay, add the following to your theme's functions.php file:

    function os_posts_order( $query ) {
      if ( $query->is_main_query() ) {
        $query->set( 'orderby', 'menu_order' );
        $query->set( 'order', 'ASC' );
      }
    }
    
    add_action( 'pre_get_posts', 'os_posts_order' );

    Not tested.

  5. Haz
    Member
    Posted 1 year ago #

    Thanks for tying Oliver, I used this code and I got a syntax error.

  6. wpseek
    Member
    Plugin Author

    Posted 1 year ago #

    Where did you add the code and what's the error message? The code looks valid to me.

    Best would be to open your theme's functions.php file, and add the code to the very end of the file.

  7. Haz
    Member
    Posted 1 year ago #

    thats what a did...put it in the functions.php...at the end of the file before the closing bracket.

  8. Haz
    Member
    Posted 1 year ago #

    Hey Oliver, I tried it again and it works...thanks a million. GREAT plugin, btw. Happy Holidays.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Admin Management Xtended
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.