WordPress Button Shortcodes: How to Add a Button to Your Site
Struggling to add buttons to your WordPress site? Well, since this platform doesn’t have any default feature that allows you to create one, we have to get some help from plugins. In this tutorial, we’ll show you how to use both WordPress button shortcode and non-shortcode plugins.
What are Shortcodes?
Before we begin the tutorial, we should understand what shortcodes are.
Essentially, shortcodes are simple code wrapped in square brackets — [like this one] — that enable you to add more functionality to your WordPress posts and pages.
To use a WordPress button shortcode, simply type them in the post editor and WordPress will render the code and display the result on your website.
The beautiful thing about WordPress button shortcodes is that you can make one on your own if the available codes don’t meet your needs.
In this particular case, we’ll cover creating a WordPress button shortcode to add buttons on your website. But as writing code from scratch is difficult for most people, we’ll teach you how to do it by using plugins instead.
Later on, we’ll also give you an alternative to shortcode plugins if you want a different solution.
So let’s get started, shall we?
How to Add Buttons in WordPress
There’s no doubt that website buttons are a great way to encourage people to perform a specific action such as sign up, log in, download a file, and so on. For example, Amazon uses buttons to make it easy for visitors to add an item to their cart and make a purchase.
You can also insert a button like the one in the example above.
Creating A Button Shortcode Using Plugins
Among many WordPress shortcode button plugins available, our top pick has to be MaxButtons. It has more than 100.000 active installations, is compatible with various WordPress versions, and more importantly, is very easy to use so anyone can utilize it without a problem.
To get started, download and activate the plugin. Then, head over to the MaxButtons menu. Once you’re on the plugin’s dashboard, click Add New and you’ll be taken to the Button Editor. The first thing you need to fill out is the basic information such as the button name (to identify and find a button if you create multiple), URL (the link within the button), and the button text (the text on the button).
In this first section, you can also change the font, text colors, text color hover, and the dimension of the button. All the changes you make can be seen in the live preview on the right side of your screen.
Scroll down, and you’ll see even more options for customizing the look of your buttons.
When you’re satisfied with the button style, click Save at the top of the page.
Now, go back to the MaxButtons dashboard, and you’ll see the shortcode for the button you just created. In the example below, the shortcode is [maxbutton id=”1”].
Inserting Buttons with Shortcode
When you want to insert the button into the WordPress editor, simply copy and paste the shortcode. Alternatively, you can click Add Button and choose the button you want to insert:
And that’s it! You just created your first ever WordPress button! You may not see the result on the WordPress editor, because the actual button will appear on the post when it’s published.
Alternative to Shortcode Plugins
The biggest drawback of WordPress button shortcode plugins like MaxButtons is flexibility. If you want to add a button with a slight style change, you have to go to the plugin’s dashboard and edit it from there.
So as an alternative, the best bet is to use a non-shortcode plugin like Forget About Shortcode Buttons.
Just like the name suggests, Forget About Shortcode Buttons does not rely on shortcodes. You can create a button immediately in the WordPress editor and style everything from there. Just click the Insert Button icon and you can start modifying your button right away.
The options are pretty much the same as MaxButtons — border style, background color, and the button size. But there’s an extra feature here that you’ll absolutely love: the ability to add an icon to your button. It’s a nice little touch to make your button more unique and beautiful.
If you want to use your current button again in the future, you don’t have to start all over again! Just save it by clicking the Floppy Disk icon. You can later reuse it from the Templates tab whenever you need it.
Once you’re done, click Update to insert the button.
Buttons are very beneficial for any website. They effectively grab attention and contain call-to-action texts that encourage people to perform an action.
As WordPress doesn’t provide any default feature to insert a button to your website, you’ll have to use some additional plugins. There are WordPress button shortcode-based and non-shortcode-based plugins. In this tutorial, you learned how to use both. Which one suits you best? It’s up to you to decide!