Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Add Custom Buttons with Post Editor Buttons in WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Add Custom Buttons with Post Editor Buttons in WordPress

When writing posts, have you ever found a need to add shortcodes or custom stylings? Is it something that you use often? If so, then you will like this article. We have available shortcodes, but sometimes its hard to explain it on a multi-author site. We looked around and found a fairly easy solution. Why don’t we just add custom buttons in our post editor. In this article, we will show you how to add custom buttons in WordPress with Post Editor Buttons.

Note: This trick only applies to the HTML mode of the editor.

All you have to do is install and activate the plugin Post Editor Buttons Fork. Once activated simply go to Settings » Post Editor Buttons menu. There you can add as many buttons as possible.

This sample screenshot shows how we are adding a new button that will allow our users to easily insert the next page code.

Post Editor Buttons

Once you save the settings, you can see that the button is right here.

Post Editor Buttons Example

For making changes to the Visual Editor, you should consider using TinyMCE Advanced plugin which comes with a lot of options on its own.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Birgit

    ah, now I understand, works fine! Thanks for your help, much appreciated!

  • Birgit

    ah, now I understand, works great now! Thanks for your help, much appreciated!

  • Umer Rock

    Thank you Syed Balkhi i was searching for this but i were not know what actual name for this plugin

  • Jürgen

    @Birgit… youre so right!

    I got the feeling (not for the first time) that wpbeginner don’t like plugins from german authors… so you recommend a plugin for adding buttons to the editor which has round about 3.000 downloads and ignore “AddQuicktag” from Frank Bueltge with over 100k downloads… why that, don’t tell me you don’t know about it :)

    just my 2cents

    • http://www.wpbeginner.com Editorial Staff

      I want to clearly state here that we have nothing against German authors or any other nationality for that sake. There are 21,782 plugins in the plugin repository at the time of writing this comment. And YES we do NOT know about all of them including the Add Quick Tag one that was mentioned. Honestly, we don’t know more than 300 of those plugins if that.

      -Syed Balkhi
      Founder of WPBeginner

      • Jürgen

        So then excuse me for that, was just a feeling. And thanks for your answer, I’am happy now that I was wrong :)

        Sorry ;)

    • Mark

      A little research goes a long way. Even VERY little research.

      I decided to see if Syed had ever recommended plugins by German authors. Honestly, if I hadn’t, I wouldn’t have mentioned it, because I don’t believe his choice was inspired by nationalities. But I wanted to know.

      I figured it would take me a while. This site has featured a lot of plugins, so I got ready for a long journey. I grabbed a coffee and set to work.

      The journey took me….next door. I clicked on the category ‘WordPress Plugins’, and the very next article after this one is http://www.wpbeginner.com/plugins/how-to-scan-your-wordpress-site-for-potentially-malicious-code/. The second item, Exploit Scanner has an international development team. English (UK), Irish, Canadian, American, and – surprise, surprise – German.

      Scroll down a little, and you find a plugin from an author in Africa. Still on page one of ‘Plugins’, one by an author in Slovenia. Continue on and we see authors from Poland, Jakarta, all over the United States, and yes again even from Germany, this time a plugin by a solo author, not a team. http://wordpress.org/extend/plugins/preserve-editor-scroll-position/ a plugin by http://profiles.wordpress.org/ocean90/ with a mere 886 downloads, even after the article here! So small plugins by individual German authors are shown here, when there were probably similar plugins by Americans with a lot more downloads.

      Do a little research before you accuse people and make them defend something they didn’t do.

      • Jürgen

        Surprise Surprise!

        A very little research…. so true…
        Well, i’m sorry about that i’m saying – hope you have read my previous comment… but you start me to tell you more :)

        So I grabbed a coffee too…
        “Do a little research before you accuse people and make them defend something they didn’t do.” exactly my thoughts…

        You found this?
        http://www.wpbeginner.com/plugins/how-to-scan-your-wordpress-site-for-potentially-malicious-code/

        Surprise surprise… missing “AntiVirus” http://wordpress.org/extend/plugins/antivirus/ Just a little research… Thats why I got this feeling… couse a successful/good plugins won’t be recommend… and I start thinking why…

        Now I know its just a research problem… “surprise surprise” I know I was wrong, so keep cool.

        • Mark

          Did I search for every plugin by every German design in over 20,000 plugins at WordPress? No. Why would I? I wasn’t looking for that. I was looking for evidence that Syed will not promote plugins by Germans – and I found that to be false.

          Syed doesn’t need to list every plugin by every developer. That’s already done by WordPress.org.

          Do you have a website? Have you promoted every theme and plugin by every American? No? Does that mean you hate Americans? Of course not.

          This is a place to discuss the posts, not petty squabbles, so let’s please drop this and leave the discussion area for proper discussion. Thanks.

        • Jürgen

          Thats why I said “Sorry – I was wrong with that” :) and I’am happy that I was wrong ;)

        • http://www.wpbeginner.com Editorial Staff

          Ok this got sort of heated. Thanks guys, I will make sure to do more thorough research. The issue is that I haven’t used all the plugins. The only time we write about plugins is when:

          1. a plugin author notifies us about it.
          2. a user needs something, and we do the research. Try the plugin and write about it.
          3. we find it on our twitter stream and find it interesting.
          4. we need it for our client’s project

          In all four cases, we use the plugin first. There are tons of plugins, and we haven’t used all of them. So yes, there always will be plugins that we might miss.

          -Syed

  • Birgit

    I use this one: http://wordpress.org/extend/plugins/addquicktag/
    Very good for quick adding code snippets and – like you’ve mentioned above – buttons

    • AndyiBM

      Hi Birgit (and Jürgen too),

      I hadn’t heard of AddQuickTags either, so I’ve now tested it… I was very excited by it, but then noticed it doesn’t seem to have any support for custom post types… Is there a work-round here, or do you know of another plugin that works just as well but covers the post types too, which I use frequently?

      Cheers,

      Andy

      • AndyiBM

        To answer my own question… I searched through the plugin notes, and found this: https://gist.github.com/1595155 which I put into the functions.php and now I’m sorted for post types too.

        For me, the other great benefit of the AddQuickTags plugin is that the buttons appears in BOTH Text Editor mode and HTML mode.

        • Birgit

          wow, that’s great, ANDYIBM, have you copied the complete code to your theme’s function.php? It causes error to me – or had you use this complete code as a new plugin?

        • AndyiBM

          Hi Birgit – I copied the two ‘if’ statements in but swapped out the ‘my_custom_post_type’ for my post type (only one for now, but presumably you can list them here if you have more). But these post types must already exist – I declare all my post types by hand in the functions.php (easier to port between websites) – perhaps that’s where your error come from?