Skip to content

Button Shortcode

Oliver Juhas edited this page Jun 22, 2017 · 3 revisions

Info

Displays a button element.


Example

[wm_button url="https://button-url.here" color="accent" size="xl" icon="icon-class-here"]Button text here[/wm_button]

Parameters

Please note that you can omit parameters with empty values when writing the shortcode.

Parameter Type Value example    Description
class string my-class Adds a custom CSS class(es) onto shortcode wrapper.
color predefined accent, error, info, success or warning The values actually depend on the theme you are using. The theme might support some custom set of colors. Anyway, you can use whatever value here and style it later using some custom CSS.
icon string icon-class Use one of predefined icons classes here. For the complete list of icons (and their classes) please see Appearance » Icon Font in your WordPress dashboard (your theme has to support this feature).
size predefined s (small), m (medium), l (large) or xl (extra large) Sets the button size. You can also set empty value (this is default, actually), which basically stands for m.
url string https://www.google.com Any valid URL for the button link. Default is #.

Compatibility

Please, make sure your theme supports this shortcode, before using it.
Some themes may not be compatible with certain shortcodes as they may use different approach to displaying similar elements. In that case the shortcode is displays in its raw code format on your website front-end.