Publish on WordPress

Available publishing methods


You can copy/paste the shortcode of your slider into your pages and posts, or just use the Smart Slider button in them, select your slider's name, and it will paste the shortcode there by itself.


The Gutenberg publishing method is available since version 3.3.7.

Adding a new block

You can publish the slider by creating a new Smart Slider 3 block.

Creating from paragrapgh

You can also publish the slider by creating a new paragraph and selecting Add Smart Slider 3.

Page Builders

Smart Slider 3 works with the most popular page builders. See the full list of compatible builders.


You can also select our slider in the WordPress' Appearance → Widgets. If you don't have a good widget position, check out the PHP code publishing or this documentation.

Widgets are usually showing up on more pages, so in case you would only want your slider to show up on certain pages, use a plugin, which allows you to select where widgets should show up, like this one.

PHP code

For this publishing method you will need PHP and HTML knowledge.

If you are not sure about yourself, always have a backup, and edit from your FTP, not from the Appearance → Edit, because you can make php errors there, big enough to make your whole website blank including your back-end.

WordPress offers a do_shortcode function, what you can use to put shortcodes into your theme's php files.

  • You will need to find the codepart, where you want to have your slider. You can find a documentation on how to do that here. Also this video could help.
  • After you have got the code, use the do_shortcode function to put your slider there. You can also use some other WordPress functions to make your slider only show up on certain pages.

If you modify your theme and then update it later, all modifications will be lost.

If you would like to keep updating your theme, and don't want to reinsert our PHP code every time you do that, then you could create a child theme!

Useful PHP functions

Show up everywhere:
<?php echo do_shortcode('[smartslider3 slider=1]'); ?>
Only on the homepage:
  if(is_home() || is_front_page()){
      echo do_shortcode('[smartslider3 slider=1]');
Only on that page which has 2 as its ID:
  if(get_the_ID()==2) {
      echo do_shortcode('[smartslider3 slider=1]');
Only on that page which has "Slider Test Page" as title:
  if(get_the_title()=="Slider Test Page") {
      echo do_shortcode('[smartslider3 slider=1]');
Mix them:
  if(is_home() || is_front_page() || get_the_ID()==2 || get_the_title()=="Slider Test Page") {
      echo do_shortcode('[smartslider3 slider=1]');
Do you need a little bit more dynamic way to show your sliders from your posts?  Create a new widget position instead, or use  Advanced Custom Fields plugin mixed with your code.

Advanced shortcode usage

In the examples you will see the 71 number as the slider's ID, but you have to get yours from your slider's shortcode.

Start from a given slide

Example: start from 2nd slide

[smartslider3 slider=71 slide=2]
Start from a variable given in the URL
This only works, if you are not using cache on your website! If you are using cache, then use our  JavaScript only code.

You can put variables into urls, for example:

You could use that variable to decide which slide to load first:

[smartslider3 slider=71 get=slide]
Only show the slider on the homepage

[smartslider3 slider=71 page=home]
Only show the slider on the page with the given ID

When you are in your post or page editor, you can read out the ID of the currently edited post/page from the url. For example:

In this case the page ID is 2010, and with this shortcode my slider will only show up there:

[smartslider3 slider=71 page=2010]
Only show the slider for logged in users

[smartslider3 slider=71 logged_in=1]
Only show the slider for logged out users

[smartslider3 slider=71 logged_in=0]
Only show the slider for the given user role

[smartslider3 slider=71 role=subscriber]

If you are not sure about the exact user role identifier on your website, use a plugin like  User Role Editor and check out the identifiers in it.


Only show the slider for users having the given capability

[smartslider3 slider=71 cap=edit_posts]

WordPress has some default capabilities what you can see  here, but you can use User Role Editor to identify all the available capabilities.


Only show the slider on a given language

[smartslider3 slider=71 lang=en_US]

WordPress has a  get_locale function, which returns the language of the currently viewed page. Language plugins should be compatible with this function, so this language identification should work. It is possible, that the languages will be stored similarly as you see it on this list (example: en_US, hu_HU), but if that wouldn't work, try their lowercase versions (example: en_us, hu_hu) or only use the shorter version (en, hu). If you are a developer, this PHP code could tell you the exact value you are looking for:


Force the slider to load inside an iframe

[smartslider3 slider=71 iframe="some reason"]

You can force our slider to load inside an iframe, so it wouldn't be affected by any codes coming from your website. This can be a solution for  autop problems, too strong CSS codes coming from the theme or custom codes, etc.. The "some reason" can be anything, so you could even write the same "some reason" text. Please note, that if you have one slider loading with iframe, on that page all sliders following it will be loading inside iframes.

Be sure to change 71 with your slider's id.