WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have disabled many of the TinyMCE buttons making the two rows quite empty. Is it possible to move the remaining buttons from the second row (that is displayed when hitting the Kitchen Sink button) to the top row?

share|improve this question

Solved it.

So, in order to move the default buttons from first row to second row, we will need to hook into the mce_buttons filter:

function move_mce_buttons_to_top($buttons) {    

    $buttons[] = 'redo';
    // buttons

    return $buttons;
add_filter('mce_buttons', 'move_mce_buttons_to_top');

Then, to add the Paragraph drop-down to top row, we will add them as custom styles.

Firstly, let us enable the styleselect into mce_buttons (top row):

// Callback function to insert 'styleselect' into the $buttons array
function my_mce_buttons( $buttons ) {
    array_unshift( $buttons, 'styleselect' );
    return $buttons;
// Register our callback to the appropriate filter
add_filter('mce_buttons', 'my_mce_buttons');

And then register each item accordingly:

add_filter( 'tiny_mce_before_init', 'drop_mce_before_init' );  

function drop_mce_before_init( $settings ) {  

    $style_formats = array(  
            'title' => 'Paragraph',  
            'block' => 'p', 
            'title' => 'Heading 2',  
            'block' => 'h2',  

    $settings['style_formats'] = json_encode( $style_formats );  

    return $settings;  


EDIT: Updated code to function properly with the P tag.

share|improve this answer

Your Answer


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.