Home Plugins bulma shortcodes
Bulma Shortcodes logo

Bulma Shortcodes

by bartboy011 on WordPress.org

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

(1)
The Bulma shortcode dropdown in the editor.

The Bulma shortcode dropdown in the editor.

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 Your Content.

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 .

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:

Menu

Creates a Bulma menu.

Ex:

[bulma-menu]
[bulma-menu-label]Label[/bulma-menu-label]
[bulma-menu-list]Item1|Item2[/bulma-menu-list]
[/bulma-menu]
Active installations20+
Weekly downloads
7-41.67%
Version1.0
Last updated7/8/2017
WordPress version2.5
Tested up to4.7.29
Tags
shortcodes