WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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've been searching the codex, and I'm probably overlooking something somewhere, but could someone tell if it would be possible to remove a button/quicktag from the WordPress html editor?

share|improve this question
up vote 4 down vote accepted

With the quicktag_settings filter:

function wpa_47010( $qtInit ) {
    $qtInit['buttons'] = 'strong,em,link,block,del,img,ul,ol,li,code,more,spell,close,fullscreen';
    return $qtInit;
add_filter('quicktags_settings', 'wpa_47010');

The default is:

$qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close';

Though 'fullscreen' usually gets added too at the end. So I just deleted the 'ins' button.

Edit to add:

If you wish to create a custom button the following tutorial might help.

share|improve this answer
Thanks @helgatheviking! I'm sure I've read that article. Don't know how I might have misinterpret that one though. – Charlie Mar 27 '12 at 18:16
welcome! i think in the article they advocate disabling buttons via filtering $qtInit['disable_buttons']. but i didn't see that in the source code anywhere. adambrown.info/p/wp_hooks/hook/… – helgatheviking Mar 27 '12 at 18:28

I'm late to this party I know, but might I add that it's better to be agnostic about the default buttons provided by Wordpress. So instead of typing the buttons you want, I choose to remove the buttons I don't want:

function nmt_quicktags_buttons( $qt_init) {
    $del_buttons = array('del','ins','img','code');
    $qt_init['buttons'] = implode(',', array_diff(explode(',',$qt_init['buttons']), $del_buttons));
    return $qt_init;

Now if anyone at Wordpress decides the quicktags-toolbar gets a new button, it will show up in your editor without a code change of your plugin/function.

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.