I recognize this would be better suited for the plugin’s official support thread, but the developer doesn’t appear to read the forums.
I’m using the Standout CSS3 Buttons plugin to add buttons via shortcode around my site. There’s an optional parameter in the shortcode, cssclass
, which allows you to specify a custom class for the button. Since my site is built on the Gantry framework, which already has rules for the .button
class, I’d really like to simply declare cssclass="button"
in the shortcode and let Gantry’s CSS cover it. Unfortunately, when I do that, the plugin doesn’t appear to recognize it, and when the page loads, the button does not have the .button
class.
If, instead of cssclass="button"
, I specify a class defined by the plugin, such as "button-pinterest"
or "button-rss"
, the button updates just fine, reflecting that class and the appropriate styles. It seems as though the plugin is stripping out any custom class–which seems to defeat the very purpose of offering custom CSS classes.
You can see a button generated by the plugin on a page here, in the sidebar. Right now, it’s using the .button-pinterest
class, and I’d like to give it the .button
class instead.
I don’t have the PHP chops to look at the plugin and figure out how to make it add the class I specify in the shortcode. Is there anyone who could kindly take a look at it and help me add my custom classes?
You can hijack the shortcode and use your own additional logic.
Sample code, not tested:
By the way: I wouldnât use that plugin on any of my sites. The code makes me cringe. You should really consider implementing the buttons you need in your theme and get away with less and better code.