Created
October 22, 2013 20:41
-
-
Save slightlyoffbeat/7107733 to your computer and use it in GitHub Desktop.
Allows you to set custom order for custom post types. Requires: 'supports' => array('page-attributes'),
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 my_custom_archive_order( $vars ) { | |
if ( !is_admin() && isset($vars['post_type']) && post_type_supports($vars['post_type'], 'page-attributes') ) { | |
$vars['orderby'] = 'menu_order'; | |
$vars['order'] = 'ASC'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment