Plugin / Bulma Shortcodes

Joshua Bartlett

Description

Description

This plugin adds a collection of WordPress shortcodes for Bulma components as well as a simple TinyMCE dropdown to add them.

Usage

The easiest way to add shortcodes is through the Bulma dropdown in the WordPress editor. Alternatively, you can manually type out the shortcodes.

Columns

Columns are used to create a responsive grid:

[bulma-columns]
[bulma-column]
Your content...
[/bulma-column]
[bulma-column]
Your content...
[/bulma-column]
[/bulma-columns]

The [bulma-column] shortcode accepts a type argument:

[bulma-column type="is-8"][/bulma-column]

Due to limitations within the WordPress shortcode system, nesting identical shortcodes will break. To work around this, there are additional shortcodes you can use that will also produce columns:

// Will break
[bulma-columns]
    [bulma-column]
        [bulma-columns]
            [bulma-column][/bulma-column]
            [bulma-column][/bulma-column]
        [/bulma-columns]
    [/bulma-column]
    [bulma-column]
        [bulma-columns]
            [bulma-column][/bulma-column]
            [bulma-column][/bulma-column]
        [/bulma-columns]
    [/bulma-column]
[/bulma-columns]

// Will Work
[bulma-columns]
    [bulma-column]
        [bulma-columns-1]
            [bulma-column-1][/bulma-column-1]
            [bulma-column-1][/bulma-column-1]
        [/bulma-columns-1]
    [/bulma-column]
    [bulma-column]
        [bulma-columns-1]
            [bulma-column-1][/bulma-column-1]
            [bulma-column-1][/bulma-column-1]
        [/bulma-columns-1]
    [/bulma-column]
[/bulma-columns]

You can nest up to five levels deep with this system (column, column-1, column-2, column-3, column-4).

Button

Creates the tag <a href="#" class="button">Your Content</a>.

Accepts three arguments:

  • type – Accepts class names – defaults to ‘is-primary’
  • link – Accepts strings – defaults to ‘#’
  • icon – Accepts valid font-awesome icon names

Ex: [bulma-button type="is-primary" link="www.example.com" icon="github"]Star on GitHub[/bulma-button].

Icon

Creates the tag <span class="icon"><i class="fa fa-<icon name>></i></span>".

Accepts two arguments:

  • type – Accepts class names – defaults to ‘is-primary’
  • icon – Accepts valid font-awesome icon names

Box

Adds a Bulma box element.

Accepts one argument, type. Defaults to NOT full-width box as this element in WordPress is mostly helpful for adding emphasis to an item like a photo. If type is set to full-width, it’ll behave like a normal Bulma box.

Ex:

// NOT full-width
[bulma-box]Your content...[/bulma-box]

// Full-width
[bulma-box type="full-width"]Your Content...[/bulma-box]

Notification

Adds a Bulma notification element.

Accepts one argument, type.

Ex: [bulma-notification type="is-primary"]Alert[/bulma-notification]

Card

Creates a Bulma Card element. This shortcode has several child codes:

[bulma-card]
[bulma-card-header][/culma-card-header]
[bulma-card-content][/bulma-card-content]
[bulma-card-footer][/bulma-card-footer]
[/bulma-card]

None of the shortcodes accept arguments.

[bulma-card-footer] can be given multiple footer items:


[bulma-card-footer]Item1|Item2|Item3[/bulma-card-footer]

// Will generate:

<footer class="card-footer">
    <div class="card-footer-item">
        Item1
    </div>
    <div class="card-footer-item">
        Item2
    </div>
    <div class="card-footer-item">
        Item3
    </div>
</footer>

Menu

Creates a Bulma menu.

Ex:

[bulma-menu]
[bulma-menu-label]Label[/bulma-menu-label]
[bulma-menu-list]<a href="#">Item1</a>|<a href="#">Item2</a>[/bulma-menu-list]
[/bulma-menu]

Ratings

5
1 reviews

Rating breakdown

Details Information

Version

1.0

First Released

07 Jul, 2017

Total Downloads

536

Wordpress Version

2.5 or higher

Tested up to:

4.7.15

Require PHP Version:

-

Tags

There is no tag found

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.