Skip to content

Tabs Shortcode

Oliver Juhas edited this page Jun 22, 2017 · 2 revisions

Info

Displays tabs.
You can display tabs in multiple layouts (on top or on sides) and also with a tour (navigation guiding from one tab to another).


Example

This shortcode is a wrapper for an additional item child shortcode and requires it to work properly.
Use both shortcodes to create a full tabs element, such as:

[wm_tabs active="1" layout="left" tour="1"]
[wm_item title="First tab"]
Tab text here.
[/wm_item]
[wm_item title="Second tab"]
Tab text here.
[/wm_item]
[wm_item title="Last tab"]
Tab text here.
[/wm_item]
[/wm_tabs]

Add as many item sub-shortcodes as you need. Each item represents a tab.


Parameters

Please note that you can omit parameters with empty values when writing the shortcode.

Parameter Type Value example    Description
active integer 0, 1, 2,… Order number of the tab to be shown by default. For example, 1 stands for first tab shown.
class string my-class Adds a custom CSS class(es) onto shortcode wrapper.
layout predefined top, left or right Sets the tabs layout, default is top.
tour boolean 0 (false) or 1 (true) Enables or disables a tour - navigation guiding from one tab to another.

Compatibility

Please, make sure your theme supports this shortcode, before using it.
Some themes may not be compatible with certain shortcodes as they may use different approach to displaying similar elements. In that case the shortcode is displays in its raw code format on your website front-end.