Skip to main content

[WP] Using Slide Markup Editor

Slide Markup Editor requires at least basic HTML knowledge.

Short video-introduction:


With Slide Markup Editor you can modify the base template of a slide. To enter it click on "Edit slide markup" in General Options of the slider. Correct HTML markup for slide can be found in documentation of jQuery version of plugin. Please note that all elements of the slider, like captions, thumbnails and tabs grab data from the slide markup, so make sure that they are included.

Note, that if you change template of a slide - slide markup will be changed to default too., so you can always "reset to default".

Lists of supported {{variables}}

About editor

Editor it's powered by Mustache template engine and supports everything what Mustache can do (like chaining and statements).
For example, the code below will output A tag only when {{link_url}} is defined.

<a href="{{link_url}}">Learn more...</a>

Or when {{link_url}} is NOT defined:

This text will be displayed only when link_url is not defined.

Variables in slide, like {{animated_blocks}} and {{html}} are only used for Custom Slider type.

Please note that there should be only one root element of a slide


If you wish to add your custom {{variables}}, please refer to this article.

Feel free to request a feautre

If you think that plugin is missing some tag, feel free to contact the support and request it.

Example 1 (custom caption)

To display the slide title and description inside the caption click on Edit Slide Markup in General Options to open the editor. And right after {{image_tag}} add such code:

<div class="rsCaption">

You may use any desired HTML markup. Full slide markup example:

<div class="rsContent">
<div class="rsCaption">
<a class="rsLink" href="{{link_url}}">{{title}}</a>

More info in docs of HTML version.

Example 2 (custom thumbnail or tab)

Now let's assume that you wish to see "small image" + "title" in each thumbnail or tab. In Slide Markup Editor, instead of {{thumbnail}} paste the code:

<div class="rsTmb">
<img src="{{thumbnail_url}}" />

Tabs use the same rsTmb markup as thumbnails.

Example 3 (custom IMG structure with srcset)

To add an attribute to the image replace {{image_tag}} with actual markup of <img> element. For example, let's add srcset attribute to serve different image for high-dpi screens:

<img src="{{image_url}}" alt="{{title}}" srcset="{{large_image_url}} 2x" />

Please note that if you do not define rsImg class on <img> element, default JS-based scaling options won't work, but you can use CSS to align the image (here is an example of 'fit" scale mode implemented just via CSS).

More info in docs of HTML version.