DevDmBootstrap3

Twitter Bootstrap 3 WordPress Starter Theme for Developers

These shortcodes are available by default if you are using the GitHub Version of the theme. Follow these instructions to add them to the WordPress Theme Directory version.

I wrestled with the idea of creating shortcodes for ALL of Bootstraps components but I decided that was counter productive to the mission of creating a clean simple template for Developers to work with. So I created only two for Buttons and Alerts. If you fail to specify any value within the shortcodes list of accepted parameters it will just use regular default Bootstrap settings. The shortcodes.php file is located in “DevDmBootstrap3/shortcodes.php.” It is very procedural and very basic.

Buttons

The “btn” shortcode will accept 4 different parameters all based around the default Bootstrap css classes for creating buttons.

1) Size: xs (Extra Small), sm (Small), lg (Large button) and no value will use default.

2) Type: default, primary, success, info, warning, danger, link (or any button class you create using “btn-yourclass”). No value set will use ‘btn-default.’

3) Link: This must be a fully qualified URL (must have http://). link=’http://devdm.com’ – YES. link=’Devdm.com’ – NO.

4) Icon: You can put in the class for any of the Glyphicons.

Examples

Button Button Button Button

Button Button Button Button

Button Button Button Button

Button Button Button Button

Button Button Button Button

Button Button Button Button

Button Button Button Button

Alerts

The “alert” shortcode will accept 4 parameters.

1) Type: error or danger, success, info, and no set value will default to “warning.”

2) Dismiss: Creates the little closing “x” in the corner for the alert to be closed.

3) Size: The span size of the alert. Defaults to “3.”

4) Title: Gives the alert the <h4 class=”alert-heading”>Title</h4> element.

×

Alert Block Title

This is an alert box that has VERY important information.

×

Alert Block Title

This is an alert box that has VERY important information.

Alert Block Title

This is an alert box that has VERY important information.

Alert Block Title

This is an alert box that has VERY important information.



 

6 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *