Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have added post formats support to my theme. The post formats box appears on the bottom of the sidebar in the New/Edit post page. It appears below the Categories, Tags and Featured Image. Is it possible to change its position in the sidebar and for example show it before the categories?

I understand we can drag and drop the boxes, but I want to set the default position.

Thanks.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

What you can do is remove the post formats meta box and adding again in another position.

If you put this in functions.php:

// remove post format meta box
function remove_post_format_box() {
    remove_meta_box( 'formatdiv' , 'post' , 'side' ); 
}
add_action( 'admin_menu' , 'remove_post_format_box' );


// Add post format meta box to a new position
function add_post_format_box() {
    add_meta_box( 
        'formatdiv', 
        _x( 'Format', 'post format' ),    // for translation
        'post_format_meta_box',    // use the same wordpress already defined function
        'post', 
        'side',   // context
        'high'    // priority in that context
    );
}
add_action( 'add_meta_boxes', 'add_post_format_box' );

With this you put the post format box in the first position of the sidebar. Using this method it's not possible to define the exact position it will appear, you can only define its priority in a certain part of the page, unless its moved by the user.

Another option is to use some jQuery or javascript to move the post-format box to another location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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