WordPress plugin that provides shortcodes for easier use of the Bootstrap styles and components in your content.
Bootstrap 4 Shortcodes for WordPress creates a simple, out of the way button just above the WordPress TinyMCE editor (next to the "Add Media" button) which pops up the plugin's documentation and shortcode examples for reference and handy "Insert Example" links to send the example shortcodes straight to the editor. There are no additional TinyMCE buttons to clutter up your screen, just great, easy to use shortcodes!
Requirements
This plugin won't do anything if you don't have WordPress theme built with the Bootstrap framework. This plugin does not include the Bootstrap framework. The icon shortcodes require Font Awesome 5 or better.
The plugin is tested to work with Bootstrap 4.5 and WordPress 5.5 and requires PHP 5.3 or better.
Wordpress is not able to process nested shortcodes - like a card inside a card - correctly; see Wordpress: Nested Shortcodes. Some of the shortcodes have aliases with the extension -outer to allow nesting.
Data attribute and value pairs separated by a comma. Pairs separated by pipe. Example: data="columns,3|index,1" expands to data-columns="3" data-index="1".
optional
any text
none
[container-fluid] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add
optional
any text
none
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe. See example at [container] parameters).
optional
any text
none
[row] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add
optional
any text
none
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe. See example at [container] parameters.
optional
any text
none
[column] parameters
Parameter
Description
Required
Values
Default
xs
Size of column on extra small screens (less than 576px)
optional
1-12
false
sm
Size of column on small screens (greater than 576px)
optional
1-12
false
md
Size of column on medium screens (greater than 768px)
optional
1-12
false
lg
Size of column on large screens (greater than 992px)
optional
1-12
false
xl
Size of column on extra large screens (greater than 1200px)
optional
1-12
false
offset-xs
Offset on extra small screens
optional
1-12
false
offset-sm
Offset on small screens
optional
1-12
false
offset-md
Offset on column on medium screens
optional
1-12
false
offset-lg
Offset on column on large screens
optional
1-12
false
class
Any extra classes you want to add
optional
any text
none
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe. See example at [container] parameters.
[card]
[list-group]
[list-group-item]Cras justo odio[/list-group-item]
[list-group-item]Dapibus ac facilisis in[/list-group-item]
[list-group-item]Vestibulum at eros[/list-group-item]
[/list-group]
[/card]
Kitchen sink
[card]
[card-img top]
[img-gen bg="f00" text=" " class="img-fluid"]
[/card-img]
[card-body]
[card-title]
Card Title
[/card-title]
Some quick example text to build on the card title and make up the bulk of the card's content.
[/card-body]
[list-group flush]
[list-group-item]Cras justo odio[/list-group-item]
[list-group-item]Dapibus ac facilisis in[/list-group-item]
[list-group-item]Vestibulum at eros[/list-group-item]
[/list-group]
[card-body]
<a href="#">Lorem Ipsup</a> <a href="#">Dolor Sit</a>
[/card-body]
[/card]
Card with image cap
Image caps are supported with the [card-img] shortcode and the top or bottom flag.
[card]
[card-img top]
[img-gen bg="f00" text=" " class="img-fluid"]
[/card-img]
[card-body]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-body]
[/card]
Card with image overlay
Image overlay cards are supported with the [card-img-overlay] shortcode.
[card]
[card-img]
[img-gen bg="f00" text=" " class="img-fluid"]
[/card-img]
[card-img-overlay]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-img-overlay]
[/card]
Card with Header and Footer
Card header and card footers are supported with the [card-header] and [card-footer] shortcodes.
[card]
[card-header]
Example Header
[/card-header]
[card-body]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-body]
[card-footer]
Example footer.
[/card-footer]
[/card]
Card group
Use card groups to render cards as a single, attached element with equal width and height columns.
[card-group]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Cras justo odio.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Dapibus ac facilisis in.
[/card-body]
[/card]
[/card-group]
Card deck
Use a card deck for a set of equal width and height cards that arenβt attached to one another.
[card-deck]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Cras justo odio.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Dapibus ac facilisis in.
[/card-body]
[/card]
[/card-deck]
Card columns
Cards can be organized into Masonry-like columns with just CSS by wrapping them in [card-columns]
[card-columns]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Lorem ipsum dolor sit.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Cras justo odio.
[/card-body]
[/card]
[card]
[card-body]
[card-title]
Card Title
[/card-title]
Dapibus ac facilisis in.
[/card-body]
[/card]
[/card-columns]
[card] parameters
The tag [card-outer] allows to nest cards inside a card.
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-body] parameters
Note: Any p, a or blockquote tags within [card-body] will automatically receive card-text, card-link or card-bodyquote classes respectively.
The tag [card-body-outer] allows to nest cards inside a card body.
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-title] parameters
Note:[card-title] should contain a heading tag (h1, h2, h3, h4, h5, or h6), inserted using the WordPress editor. If a heading tag is not added h4 will be inserted automatically.
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-subtitle] parameters
Note:[card-subtitle] should contain a heading tag (h1, h2, h3, h4, h5, or h6), inserted using the WordPress editor. If a heading tag is not added h6 will be inserted automatically.
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-img] parameters
Note:[card-img] should contain an image inserted using the WordPress editor or the img-gen tag.
Parameter
Description
Required
Values
Default
top
Flag whether this image cap is at the top of the card.
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-img-overlay] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-header] parameters
Note:[card-header] should contain a heading tag (h1, h2, h3, h4, h5, or h6), inserted using the WordPress editor. If a heading tag is not added div (no heading) will be inserted automatically.
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-footer] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-group] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-deck] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
optional
any text
[card-columns] parameters
Parameter
Description
Required
Values
Default
class
Any extra classes you want to add.
optional
any text
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe.
Button Dropdowns can be accomplished by combining the [button-group] shortcode, the "data" parameters of the [button] shortcode, and [dropdown] or [dropdown-menu] shortcode as follows.
Use border utilities to quickly style the border, border-radius, border-size and border-color of an element. Great for images, buttons, or any other element.
Change the alignment of flex items on the main axis
optional
start, end, center, between, around
align-content
Set flexbox container to align flex items together on the cross axis. This property has no effect on single rows of flex items.
optional
start, end, center, between, around, stretch
start
align-items
Change the alignment of flex items on the cross axis (the y-axis to start, x-axis if flex-direction column).
optional
start, end, center, baseline, stretch
start
wrap
Set how flex items wrap in a flex container.
optional
true, reverse
false
class
Any extra classes you want to add
optional
any text
none
data
Data attribute and value pairs separated by a comma. Pairs separated by pipe. See example at [container] parameters.
optional
any text
none
[flex-item] parameters
Parameter
Description
Required
Values
Default
align
Align individual flex items on the cross axis.
optional
start, end, center, baseline, stretch
start
fill
Force elements into widths equal to their content (or equal widths if their content does not surpass their border-boxes) while taking up all available horizontal space.
[popover title="I'm the title" content="And this is the content" placement="auto" animation]
[button outline class="mr-3"] Click Me [/button]
[/popover]
[carousel-item] wraps an HTML image tag, image inserted via the WordPress editor or the img-gen tag. It can also be used for text slides but you may need to use additional utilities or custom styles to appropriately size content.
[carousel] parameters
Parameter
Description
Required
Values
Default
interval
The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
optional
any number (in ms) or "false"
5000
pause
Pauses the carousel from going through the next slide when the mouse pointer enters the carousel, and resumes the sliding when the mouse pointer leaves the carousel.
optional
hover, false
hover
wrap
Whether the carousel should cycle continuously or have hard stops.
optional
true, false
true
indicators
Whether the carousel should show the slide indicator.