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'm currently using the menu_order field in the DB to have some custom ordering of posts. I want to expose this field to the user via the admin section, like it is when editing a Page (in Page Attributes).

Is there a simple way to do this?

share|improve this question
up vote 1 down vote accepted
add_action( 'init', 'wpse31629_init' );
function wpse31629_init()
    add_post_type_support( 'post', 'page-attributes' );

Add that to your functions.php or in a plugin file and you'll get an attributes dialog box with the menu order input.

share|improve this answer
@Ben This IS the exact interface you're asking for. – Drew Gourley Oct 20 '11 at 16:00
This is perfect. – Benjamin Greenberg Oct 20 '11 at 16:45

This isn't the exact interface you're asking for, but you might like this.


It modifies the 'menu_order' field the same way you are, and it also allows you to set an option to auto sort all queries from specific post types, so you don't have to manually set the 'orderby' and 'order' arguments when getting posts.

share|improve this answer
Thanks, but I'm doing a lot of custom ordering in code, so I don't want to use a plugin that will mess with that. – Benjamin Greenberg Oct 20 '11 at 16:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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