0

I am new in WordPress. I am trying to add a filter for tinymce like:

function wpdocs_teeny_mce_button( $buttons, $editor_id ) {
    $buttons = array('bold', 'italic');
    return $buttons;
}
add_filter( 'teeny_mce_buttons', 'wpdocs_teeny_mce_button', 10, 2 );

But I am not getting any change in my editor. Please help

  • What is the goal? You will remove default buttons and leave only bold and italic as button? You use the wrong hook, WP use 3 different hooks for each line in the TinyMCE, like mce_buttons, mce_buttons_2. See also this answer for more background and hints. – bueltge Aug 13 '15 at 9:05
  • I want to add only 2 button and want to remove rest all from editor. – Addy Aug 14 '15 at 12:21

Your Answer

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

Browse other questions tagged or ask your own question.