No of shorcode available for this plugin: 01
In frontend tour can be used in different ways like shortcode, custom function call etc.
Shortcode: [cbxtakeatour]
The easiest way to display tour is shortcode method.
<code class="language-php">[cbxtakeatour id="tour post id here"]</code>
More details shortcode params are below
<code class="language-php"> 'id' => 0, //tour post id 'button_text' => '',//button display text 'align' => '', //'left', 'center', 'right', 'none', put empty to ignore shortcode param 'block' => '', //1 = block/full width , 0 = not applicable , put empty to ignore shortcode param 'display' => '', //1 = display , 0 = hide , put empty to ignore shortcode param 'auto_start' => ''// 1 = auto start, 0 = starts on click, put empty to ignore shortcode param </code>
If you don’t override any param just keep the empty, Example, if you want to put align from shortcode then use the shortcode like this
<code class="language-php">[cbxtakeatour id="tour post id here" align="left"]</code>
If you don’t want to override, don’t use any extra shortcode param than ‘id’, rest values will be take from tour edit from backend.
Custom function: ‘cbxtakeatour_display’
To display tour button or integrate using custom code or code level we have a function called “cbxtakeatour_display” , you have to send same params of shortcode as arary
<code class="language-php"> $data = [ 'id' => 0, //tour post id 'button_text' => '', //button display text 'align' => '', //'left', 'center', 'right', 'none', put empty to ignore shortcode param 'block' => '', //1 = block/full width , 0 = not applicable , put empty to ignore shortcode param 'display' => '', //1 = display , 0 = hide , put empty to ignore shortcode param 'auto_start' => ''// 1 = auto start, 0 = starts on click, put empty to ignore shortcode param ]; echo cbxtakeatour_display($data); </code>
Status: This page documentation is completed.
Last modified: August 22, 2023