Skip to content

Instantly share code, notes, and snippets.

@alessandrotesoro
Created April 28, 2015 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alessandrotesoro/b270ffc2bf9e4267b93d to your computer and use it in GitHub Desktop.
Save alessandrotesoro/b270ffc2bf9e4267b93d to your computer and use it in GitHub Desktop.
WPRM Menu Order
function wprm_add_menu_order( $args ) {
$args['supports'] = array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes' );
return $args;
}
add_action( 'wprm_menu_post_type_args', 'wprm_add_menu_order' );
function wprm_change_items_order( $args ) {
$args['orderby'] = 'menu_order';
return $args;
}
add_filter( 'wprm_menu_category_args', 'wprm_change_items_order' );
add_filter( 'wprm_full_menu_args', 'wprm_change_items_order' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment