Shortcodes Reference

Every Elephanta shortcode with examples: reusable templates, popups, Super Slider, language switcher and language-specific content.

Developer 2 min read Updated
On this page

Shortcodes let you use Elephanta features in any editor, widget area or theme that supports shortcodes.

#Reusable template

[elephanta_template id="123"]

Outputs a reusable template. Editing the template updates every placement.

[elephanta_popup id="123"]Open the offer[/elephanta_popup]

Wraps the text in a link that opens popup 123. You can also link any element to #elephanta-popup-123.

#Super Slider

[elephanta_slider id="123"]

Places a Super Slider. In PHP: Elephanta\Super_Slider\Super_Slider::output( 123 );

#Language switcher

[elephanta_translate style="pills" display="flag_code" languages="en,hi,fr"]
Attribute Example values
style dropdown, pills, inline list and other switcher styles
display flag_code and other flag/name combinations
languages Comma-separated language codes

#Language-specific content

[elephanta_lang only="hi"]This text is shown only to Hindi visitors.[/elephanta_lang]

#Forms

Each form has its own shortcode, shown in Elephanta → Forms → All Forms. Copy it and paste it anywhere.

#Code snippets

A Custom Code snippet with the placement Only where the shortcode is placed shows its own shortcode in the snippet editor.

Link / attribute Effect
#elephanta-popup-ID Opens popup ID
#elephanta-popup-close Closes the current popup
#elephanta-popup-dismiss Closes the popup for good
class elephanta-popup-convert Counts a popup conversion
data-elt-switch="de" Switches the site language on click
class notranslate Keeps an element untranslated
?lang=fr Shareable link in a chosen language