Publish on WordPress

Available publishing methods

Shortcode

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.

Widget

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.

PHP code

For this one 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 with different browsers 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.
Show up everywhere:
<?php echo do_shortcode('[smartslider3 slider=1]'); ?>
Only on the homepage:
<?php
  if(is_home() || is_front_page()){
      echo do_shortcode('[smartslider3 slider=1]');
  }
?>
Only on that page which has 2 as its ID:
<?php
  if(get_the_ID()==2) {
      echo do_shortcode('[smartslider3 slider=1]');
  }
?>
Only on that page which has "Slider Test Page" as title:
<?php
  if(get_the_title()=="Slider Test Page") {
      echo do_shortcode('[smartslider3 slider=1]');
  }
?>
Mix them:
<?php
  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.
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!

Advanced shortcode usage 3.1.7.

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: http://example.com/index.php?slide=5

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:

http://example.com/wp-admin/post.php?post=2010&action=edit

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

[smartslider3 slider=71 page=2010]