Skip to main content

Shortcodes

A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Workshop Butler plugin uses them to help you change the layout of the pages easily.

info

If you are not familiar with the shortcodes, we recommend to read this article first.

Types of shortcodes​

Since version 3.0.0 there are only page-level shortcodes available.

Page level shortcodes are used to render the content of a whole page. For example, [wsb_schedule] renders an event schedule. You add the shortcodes of this type to the body of WordPress page.

wsb_schedule​

This shortcode should be added to a post or a page as a placeholder for the event schedule.

Usage​

You can use several schedules if needed. For example, you have the main schedule for all your workshops. You want to add another schedule only for the workshops of category Facilitation, on its landing page. In this case, you would need to configure attributes of [wsb_schedule] shortcode like this:

[wsb_schedule category=5 layout='table']

Attributes​

  • filters, string. Names of filters, separated by comma (,). The valid filters are trainer, location, type, language
  • category, number. Category ID to show only the events from this category
  • event_type, number|list of numbers, separated by commas. Event type (or types) to show only the events from these types. Example: 1,2,3
  • layout, string. Type of layout. There are two available layouts: table, tile. When you do not set a layout, the one you configured through the settings, is used.
  • elements, string. This attribute defines columns to show in the table layout. By default only schedule, location, title, register are shown.
  • only_featured, boolean. When true, only featured events are shown on the schedule.
  • featured_on_top, boolean. When true, featured events are at the top of the schedule
  • tags, string. Defines which tags to show for events: all for all tags, free for only free events, featured for featured events.
  • highlight_featured, boolean. When true, the schedule highlights featured events.
  • truncate, boolean|int. Maximum number of characters in the title. Adds '...' if truncation happens. When false, no truncation. Default - 60. This attribute works only for tile layout.
  • skip_event_page, boolean. When true, Register button for each event leads directly to the registration form, not to the event page.

wsb_event​

This shortcode should be added to a post or a page as a placeholder for the event page with a detailed information about the event, including a registration form.

Attributes​

  • show_expired_tickets, boolean. If true, all ticket types are shown, including the one which are sold out or ended. Default is true.
  • show_number_of_tickets, boolean. If true, the number of tickets left is shown. Default is true.

wsb_trainer_list​

This shortcode should be added to a post or a page as a placeholder for the list of trainers.

Attributes​

  • filters, string. Names of filters, separated by comma (,). By default, all filters (location, trainer, language, rating, badge) are active.

Attributes​

  • filters, string. Names of filters, separated by comma (,). The valid filters are trainer, location, language, badge, rating

wsb_trainer​

This shortcode should be added to a post or a page as a placeholder for the trainer profile.

wsb_registration​

This shortcode should be added to a post or a page as a placeholder for the event registration form.

wsb_next_event​

This shortcode should be added to a post or a page when you want to show a block with the button leading to the next active event.

Attributes​

  • category, number. Category ID to show only the events from this category
  • event_types, number|list of numbers, separated by commas. Event type (or types) to show only the events from these types. Example: 1,2,3
  • target, string. Defines where a registration form opens (new tab, new window, etc.). Possible values are the same as for target attribute for HTML link <a>. By default, set to _self. Works only for internal registration forms.
  • registration, boolean. If true, a registration button for each event leads directly to a registration page, not to an event page
  • title, string. Title of the button. If empty, a default title is taken.
  • no_event_title, string. Message to show when there is no event available. If empty, a default message is taken.

wsb_trainer_testimonials​

This shortcode should be added to a post or a page when you want to show testimonials for an exact trainer.

Attributes​

  • trainer_id, number. Trainer identifier.