Display CSS3 style buttons with gradient color styles on your website using shortcodes or PHP function call.
Based on this blog post from Brian Gardner, display cool CSS3 style gradient buttons on your site using shortcodes.
You can also call the plugin in your functions.php or in a plugin. Choose from several different color styles, partially inspired by social media, or create your own.
If this plugin breaks your site or just flat out does not work, please go to Compatibility and click “Broken” after verifying your WordPress version and the version of the plugin you are using.
Then, create a thread in the Support forum with a description of the issue. Make sure you are using the latest version of WordPress and the plugin before reporting issues, to be sure that the issue is with the current version and not with an older version where the issue may have already been fixed.
Please do not use the Reviews section to report issues or request new features.
To display on any post or page, use this shortcode:
[standout-css3-button href=”http://www.yahoo.com/”]Button text goes here[/standout-css3-button]
Make sure you go to the plugin settings page after installing to set options.
If you use and enjoy this plugin, please rate it and click the “Works” button below so others know that it works with the latest version of WordPress.
To remove this plugin, go to the ‘Plugins’ menu in WordPress, find the plugin in the listing and click “Deactivate”. After the page refreshes, find the plugin again in the listing and click “Delete”.
Use a shortcode to call the plugin from any page or post like this:
[standout-css3-button cssclass="button-dribbble" href="http://www.google.com/"] Click here [/standout-css3-button]
This will output the following:
<a class="scss3b-button-dribbble" href="http://www.google.com/" rel="nofollow">Click here</a>
CSS styling from the included .css file will be applied to this link. You may also include shortcodes within the shortcode.
The shortcode can also be used in your PHP code (functions.php, or a plugin) using the do_shortcode function, ex:
echo do_shortcode('[standout-css3-button cssclass="scss3b-button-dribbble" href="http://www.google.com/"]Click here[/standout-css3-button]');
You can also call the plugin’s function in your PHP code like this:
add_action('the_content', 'show_css3_button'); function show_css3_button($content) { if (is_page('home')) { // we are on a page with slug 'home' if (function_exists('scss3button')) { // plugin is installed/active $content .= scss3button(array('cssclass' => 'scss3b-button-rss', 'href' => 'http://www.google.com/'), 'Click here'); } } return $content; }
This will add a button (with scss3b-button-rss
color style) at the end of your content, if you are on a page with a slug named “home”. Always wrap plugin function calls with a function_exists
check so that your site doesn’t go down if the plugin isn’t active.
In short, ‘standout-css3-button’ is the shortcode and ‘scss3button’ is the PHP function name.
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.
The following styles are available.
See the dropdown list on the plugin settings menu for the most updated list. Visit http://www.jimmyscode.com/wordpress/standout-css3-buttons/ for a live demo of each style.
Do not add the “scss3b-button-” prefix. This will be added automatically by the plugin. The resulting class name will be scss3b-button-whatever you typed.
In this example, the custom CSS class will be scss3b-button-bluegreen
.
If you need help writing the CSS, look at the existing CSS file the plugin uses (filename: standout-css3-buttons.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 in the custom CSS textarea (ex: .scss3b-button-mycustomcolor { font-style:verdana }). However, when you actually call the class in your shortcode you only use the color name you created in step #1 above (ex: [standout-css3-button cssclass=”mycustomcolor” href=”http://www.google.com/”]Click here[/standout-css3-button]).
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 CSS3 Buttons: plugin is disabled. Check Settings page. -->
This means you didn’t pass a necessary setting to the plugin. For example, you must specify the URL either in the shortcode or on the plugin settings page. You should also check that the “enabled” checkbox on the plugin settings page is checked.
Make sure you aren’t using rounded="0"
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.
Are you using a plugin that minifies or combines CSS files at runtime? If so, try excluding the plugin CSS file from minification.
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 this query parameter. 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.
Add this to your functions.php:
remove_action('admin_enqueue_scripts', 'scss3b_ed_buttons');
Add this to your functions.php:
remove_action('admin_head', 'insert_scss3b_admin_css');
Add this to your functions.php:
add_action('wp_enqueue_scripts', 'remove_scss3b_style'); function remove_scss3b_style() { wp_deregister_style('standout_css3_button_style'); }
This plugin adds one or more toolbar buttons to the HTML editor. You will not see them on the Visual editor.
The label on the toolbar button is “CSS3 Button”.
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.
fixed uninstall routine, actually deletes options now
some security hardening added
added textbox to enter your own css class name, which you must define in your own stylesheet
created