• Resolved amdh

    (@amdh)


    Hi

    I have a custom taxonomy with a lot of terms. how can I change the place of this taxonomy meta box to be shown under text editor at the center of page. The left sidebar is small. This taxonomy needs a larger meta box.

    thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Just drag and drop the meta box one time in the left block…. or change the order like 2 or 3 while declaring the meta box Custom Meta Boxes

    Moderator bcworkz

    (@bcworkz)

    Add 'normal' as the $context parameter to add_meta_box().
    add_meta_box( 'meta-box-id', 'My Meta Box', 'my_display_callback', 'post', 'normal' );

    Thread Starter amdh

    (@amdh)

    I used register_taxonomy( $taxonomy, $object_type, $args ); so there is no $context parameter.

    Moderator bcworkz

    (@bcworkz)

    Ah, my bad. I somehow thought you had a custom meta box. I don’t know of a supported way to relocate the standard custom taxonomy meta box for all users. Altaf’s suggestion to simply drag it into place is a good one, it will persist there for any user who does so.

    A possible hacky solution would be to directly manipulate the global $wp_meta_boxes array. Identify your taxonomy’s meta box data in the array and move it to under the “normal” portion of the array. You ought to be able to do so by hooking the “admin_head-post.php” action. Untested, but I believe it would work.

    Thread Starter amdh

    (@amdh)

    can you explain more?

    Moderator bcworkz

    (@bcworkz)

    Sorry, what I presented is just about all I know on the topic. The next step would be to hook that action I mentioned and dump out the array data for examination. You’ll need code to copy your taxonomy meta box data into the “normal” branch of the array and unset the data’s original position in the array.

    Thread Starter amdh

    (@amdh)

    Finally, I removed the meta box and added that again:

    
    remove_meta_box( 'treediv' , 'taqrir' , 'side' );
    add_meta_box('new_treediv', 'Trees...', 'post_categories_meta_box', 'taqrir', 'advanced', 'low', array('taxonomy' => 'tree'));
    

    Note: custom post type is ‘taqrir’ and custom taxonomy is ‘tree’.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Order of taxonomy meta box’ is closed to new replies.