Bulma Shortcodes

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:

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

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:

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:

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:

None of the shortcodes accept arguments.

Menu

Creates a Bulma menu.

Ex:

0

评论0

 
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
显示验证码
没有账号?注册  忘记密码?

社交账号快速登录