1

I have a custom post type with several associated custom taxonomies. On the edit page for the custom post type, the taxonomies appear to be in the order in which they were created. I want to change this order. How do I do this?

1
  • Assuming you mean the (taxonomy widget metaboxes?) postboxes on the edit screen, take a look here for an possible answer/idea. Good luck
    – Charles
    Commented May 30, 2017 at 14:29

1 Answer 1

0

If you're talking about the edit screen boxes for these taxonomies, you can do that by changing the $content and priority parameters in add_meta_box()

$context (string) (Optional) The context within the screen where the boxes should display. Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global Default value: 'advanced'

$priority (string) (Optional) The priority within the context where the boxes should show ('high', 'low'). Default value: 'default'

add_meta_box( 'my-meta-box', 
 My Meta Box, 
 'my-meta-box-callback-function', 
 null, //unless you need the $screen parameter 
 'advanced', //change this $context parameter for placement
'default', //change this  $priority parameter for order within placement
 null // unless you need $callback_args 
 );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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