Skip to content

Instantly share code, notes, and snippets.

@jgalea
Created July 13, 2013 12:09
Show Gist options
  • Save jgalea/5990530 to your computer and use it in GitHub Desktop.
Save jgalea/5990530 to your computer and use it in GitHub Desktop.
How to change taxonomy metabox order in custom post types.
<?php
add_action('add_meta_boxes_wprss_feed', 'wprss_c_meta_box_order');
function wprss_c_meta_box_order() {
global $wp_meta_boxes;
$category = $wp_meta_boxes['wprss_feed']['side']['core']['wprss_categorydiv'];
unset( $wp_meta_boxes['wprss_feed']['side']['core']['wprss_categorydiv'] );
# We're hooking into: do_action('add_meta_boxes_' . $post_type, $post);
$wp_meta_boxes['wprss_feed']['side']['low'] = array( 'wprss_categorydiv' => $category ) + $wp_meta_boxes['wprss_feed']['side']['low'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment