I am reordering the default meta box layout in the following way:

add_action('do_meta_boxes', 'move_meta_box');

function move_meta_box(){
    remove_meta_box( 'my-itemsdiv', 'post', 'side' );
    remove_meta_box( 'submitdiv', 'post', 'side' );
    add_meta_box('my-itemsdiv', __('Something something'), 'X', 'my-item', 'normal', 'high');
    add_meta_box('submitdiv', __( 'Submit item' ), 'post_submit_meta_box', 'my-item', 'normal', 'high' );

Problem: my-itemsdiv is a custom meta box for the theme and I don't know what callback function to call ("X").

Question: Is there any way I can find out what callback function is used for this meta box? What should I search for? (This theme has quite a bit of code..)

  • Simply search the theme code for add_meta_box. – Max Yudin Feb 19 '18 at 9:35
  • Thanks, I did that, I think they are added programmatically in a minified php file, so I was hoping there was another way... – angularchobo Feb 19 '18 at 10:04
  • What is the theme name to have a look? And what you mean "minified". Obfuscated like Zend Guard? – Max Yudin Feb 19 '18 at 10:26

Please search for 'my-itemsdiv' or "my-itemsdiv" in your theme directory. I'm sure you'll find out the callback function. Because the meta box is registered with the same id. If there's any chance that the meta box is registered via a plugin then find out the plugin first then search in that plugin directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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