Created
April 28, 2015 16:23
-
-
Save alessandrotesoro/b270ffc2bf9e4267b93d to your computer and use it in GitHub Desktop.
WPRM Menu Order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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