Button Shortcode

Button Shortcode

To create buttons like you see in the header section or the read more button in the blog section you can use the deVision button shortcodes with a number of options.

Basic Usage

This is how you basically use the button shortcode setting the text and the url of the button.

This is my custom button

[ btn text="This is my custom button" url="http://demo.themeshift.com/devision" ]

* Please remove the space after [ and before ] when using the shortcode

Link

You can either set the URL of the button (like in the above example) or apply the ID of a page or a post.

Linked to entry with ID 2

[ btn text="Linked to entry with ID 2" id="2" ]

* Please remove the space after [ and before ] when using the shortcode

Target

You can optionally open the link of the button in a new window or tab with target="_blank".

Open in new window or tab

[ btn text="Open in new window or tab" url="http://themeshift.com" target="_blank" ]

* Please remove the space after [ and before ] when using the shortcode

You can even open the built-in jQuery lightbox plugin with the button shortcode.

Vimeo in Lightbox

[ btn text="Vimeo in Lightbox" url="http://vimeo.com/9851483" target="lightbox" ]

* Please remove the space after [ and before ] when using the shortcode

Size

Change the size of the button to small with size="small".

Smaller Button

[ btn text="Smaller Button" url="http://themeshift.com" size="small" ]

* Please remove the space after [ and before ] when using the shortcode

Inline

By default the button will be wrapped in p tags. Avoid that by setting p="false".

Nulla ac mauris lacus, in vehicula sapien. Sed pulvinar nunc sit amet velit aliquam bibendum. Curabitur blandit lobortis arcu vel tempus. Integer malesuada imperdiet lorem, eget euismod Inline Button dolor hendrerit eu. In quis dolor eget arcu tempus iaculis nec ac nibh. Aliquam dictum augue vitae ante porttitor id sollicitudin eros lacinia.

[ btn text="Inline Button" url="http://themeshift.com" size="small" p="false" ]

* Please remove the space after [ and before ] when using the shortcode

Buttons in a Row

Left Button Center Button Right Button

<p class="clearfix">
   [ btn text="Left Button" url="#" p="false" ] [ btn text="Center Button" url="#" p="false" ] [ btn text="Right Button" url="#" p="false" ]
</p>

* Please remove the space after [ and before ] when using the shortcode

WordPress.org

© 2010 deVision Theme Demo - Business WordPress Theme by ThemeShift