0

After using this code:

//Set custom featured image metabox
  function customposttype_image_box() {

remove_meta_box('postimagediv', 'eezzyweb-webfolio', 'side');
add_meta_box('website_grid_view', __('Featured Image for grid view'), 'post_thumbnail_meta_box', 'eezzyweb-webfolio', 'side', 'low');


  }
  add_action('do_meta_boxes', 'customposttype_image_box');

and afterwards removing it, the Featured Image metabox is at the bottom, not on the right side anymore...

Is there something I need to reset/unregister???

Thank you

3
  • 1
    Well the add meta box code certainly appears to register it to the side, if it's not in the side i can only assume that's because you moved it(drag and drop) at some point(WordPress remembers where you move meta boxes to). Simply drag it back to the side(hover over the title of the box and you'll see a drag icon).
    – t31os
    Mar 16 '11 at 13:47
  • Thank you...I was confused as in my standard posts the metabox was still on the side...;)
    – Mirko
    Mar 16 '11 at 15:48
  • I'll add it as an answer so you can accept it, will keep your acceptance rate up and show the question was sufficiently answered.
    – t31os
    Mar 17 '11 at 11:12
2

The add_meta_box code you've posted does certainly register the metabox to the bottom of the side area. If the box is shown in the center then i imagine it's because you've(at some point) moved the metabox, as can be done with any of the metaboxes(all drag and drop). WordPress remembers where you move boxes to, and only adheres to the positioning inside the add_meta_box as a default view(when they've not yet been moved).

The solution would be to drag and drop the box back to the side area, assuming this is just a case of re-positioning the metabox.

0

You can use with add_meta_box the following arguments instead of...

'side' (context): 'normal', 'advanced', or 'side'  
'low' (priority): 'high' or 'low'

...to move stuff around.

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.