Plugin Directory

Standout Color Boxes and Buttons

This plugin implements colored content boxes and buttons as described in a Studiopress blog post.

How do I use the plugin?

After installing, there are two new shortcodes:

  • [color-box]
  • [color-button]

To create color boxes, specify the color and content. Two buttons have been added to your post editor toolbar to make this easier.

[color-box color="gray"]
This is an example of a Content Box.

Color is optional ("blue" is default), but it is recommended that you always specify the color you want instead of relying on the default, in case the default ever changes.

To create color buttons, specify the color, URL and content.

[color-button color="purple" href="http://www.mysite.com/"]
Follow this link

Color is optional ("blue" is default), but it is recommended that you always specify the color you want instead of relying on the default, in case the default ever changes.

This is an example of a Content Box.
[color-button href="http://www.mysite.com/"]
Follow this link

Shortcodes inside content are allowed, i.e.

Here is something I wrapped in [another_shortcode] shortcodes.

Rounded corners and drop shadows for boxes and buttons are optional. For backward compatibility, rounded corners are turned on by default. To turn this off, add rounded="0" as a parameter in the shortcode. i.e.

[color-box color="red" rounded="0"]
This is an example of a Content Box without rounded corners.

You may also call the shortcode in your PHP code. Example:

echo do_shortcode('[color-button color="purple" 
href="http://www.google.com/"]Follow this link[/color-button]');

You can also call the box and button functions from your PHP code. Example:

if (function_exists('color_box_shortcode')) {
  color_box_shortcode(array('color' => 'purple', 
'rounded' => 0, 
'show' => 1), 
'Here is my content');
if (function_exists('color_button_shortcode')) {
  color_button_shortcode(array('color' => 'purple', 
'opennewwindow' => true, 
'href' => 'http://www.jimmyscode.com/', 
'show' => 1), 
'Visit my website');

What are the plugin defaults?

The plugin arguments and default values may change over time. To get the latest list of arguments and defaults, look at the settings page after installing the plugin. That is where the latest list will always be located. You will see what parameters you can specify and which ones are required.

What colors are available?

The currently available colors are

  • blue
  • gray
  • green
  • purple
  • red
  • yellow
  • black
  • white
  • orange
  • pink
  • bluebell

See the dropdown list on the plugin settings menu for the most updated list.

How do I create my own color schemes?

  1. When you are entering the shortcode or calling the plugin function from PHP, instead of using one of the built-in color names ("orange", "red" etc), use the class name you want to use. Ex: "bluegreen"

This will be used to build the class name as follows:

  • For color buttons, the class will be scbb-button-whatever you typed
  • For boxes, the class will be scbb-content-box-whatever you typed

In this example, it will be:

  1. Go to the plugin settings page. There is a textarea there where you enter the CSS you want to use.

If you need help writing the CSS, look at the existing CSS file the plugin uses (filename: scbb.css in the /css/ subfolder) as a model for what CSS you need. Then just change the color values accordingly and paste it into the textarea. If you want to do something above and beyond what is already in the CSS, please search the web to find help. Please don't use the plugin support forum to ask for CSS help unless there is an issue with the existing CSS.

The custom CSS stylesheet will be enqueued on pages where custom CSS class names are used.

Note: you must include the FULL class name (ex: scbb-content-box-mycustomcolor) in the custom CSS textarea. However, when you actually call the class in your shortcode you only use the color name you created in step #1 above (ex: [color-box color="mycustomcolor"]some text here[/color-box]).

I added the shortcode to a page but I don't see anything.

Clear your browser cache and also clear your cache plugin (if any). If you still don't see anything, check your webpage source for the following:

<!-- Standout Color Boxes and Buttons: plugin is disabled. Check Settings page. -->

This means the "enabled" checkbox on the settings page is unchecked. For color buttons, you must provide the URL and the hyperlink text. If the "enabled" checkbox is checked, but you do not provide a URL or hyperlink text for a button, you will see nothing.

I don't see rounded corners.

Make sure you aren't using rounded=false in your shortcode. If you are not, make sure your browser is up to date and check if it supports the border-radius CSS attribute. You may have to view the page in another browser. You may also need to refresh your browser and clear your caching plugin. Also, check the plugin settings page to make sure the "rounded corner CSS" checkbox is checked.

I cleared my cache and still don't see what I want.

The CSS files include a ?ver query parameter. This parameter is incremented with every upgrade in order to bust caches. Make sure none of your plugins or functions are stripping query parameters. Also, if you are using a CDN, flush it or send an invalidation request for the plugin CSS files so that the edge servers request a new copy of it.

I cleared my browser cache and my caching plugin but the output still looks wrong.

Are you using a plugin that minifies CSS? If so, try excluding the plugin CSS file from minification.

I don't want to use the admin CSS.

Add this to your functions.php:

remove_action('admin_head', 'insert_scbb_admin_css');

I don't want to use the plugin CSS.

Add this to your functions.php:

add_action('wp_enqueue_scripts', 'remove_scbb_style');
function remove_scbb_style() {

I don't want the post editor toolbar button(s). How do I remove it?

Add this to your functions.php:

remove_action('admin_enqueue_scripts', 'scbb_ed_buttons');

I don't see the plugin toolbar button(s).

This plugin adds one or more toolbar buttons to the HTML editor. You will not see them on the Visual editor.

The labels on the toolbar buttons are "SC Box" and "SC Button".

I am using the shortcode but the parameters aren't working.

On the plugin settings page, go to the "Parameters" tab. There is a list of possible parameters there along with the default values. Make sure you are spelling the parameters correctly.

The Parameters tab also contains sample shortcode and PHP code.

Requires: 3.5 or higher
Compatible up to: 3.9.13
Last Updated: 2 years ago
Active Installs: 8,000+


4.7 out of 5 stars


Got something to say? Need help?


Not enough data

1 person says it works.
0 people say it's broken.

50,2,1 100,1,1 100,1,1
100,1,1 50,2,1 100,1,1