Publish on WordPress

You can publish the Smart Slider 2 in three different way: via the widget control panel or by shortcode and of course you can add it to your template files too via PHP.

Widget control panel

Go to AppearanceWidgets, drag the Nextend Smart Slider 2 widget and drop it into one of your Widget Area. Here you can add a Title and you can choose from your previously created sliders. Finally press the Save button and enjoy your awesome slider!

You can also choose custom sliders for tablets, and mobile phones.


Option #1

If you click on your slider’s name, then you can see the shortcode of your slider, which you can copy and paste wherever you would like to use it, in pages and posts.

Option #2

If you go into a page or a post site and switch the editor to Visual view, then you can see our icon. Click on it and choose from the existing sliders.

PHP code

If your theme doesn’t has a good position for your slider, then you will need to hardcode it into one of your theme’s php files. All you have to do is, use the WordPress’ do_shortcode function to put our shortcode in there. You can see here how it should be, just change the ID to your slider’s, and you can paste it into your php file:
<?php echo do_shortcode('[smartslider2 slider="2"]'); ?>

Shortcode and PHP code with custom tablet and mobile phone sliders:

If you would like to have custom sliders in your site for tablets and phones, this is what you should do: 1, Go to your sliders, and get your shortcodes. 2, Check the id of your sliders. It’s the number after the equal sign.

For example:

Main slider: [smartslider2 slider=”1″] → id:1
Tablet slider: [smartslider2 slider=”2″] → id:2

Phone slider: [smartslider2 slider=”3″] → id:3

3, Insert the id-s into this shortcode: [smartslider2 slider=”1″ tablet=”2″ phone=”3″] 

4/1, Now you can go to your post or pages, and put this shortcode in.
4/2, For hardcoding your sliders into your theme files this is how your code should look like:

<?php echo do_shortcode('[smartslider2 slider="1" tablet="2" phone="3"]'); ?>
Options for this shortcode:

If you don’t want other slider, then the main one, then write -1 to it:

<?php echo do_shortcode('[smartslider2 slider="1" tablet="-1" phone="-1"]'); ?>

If you don’t want any slider for tablets or mobile phones write 0:

<?php echo do_shortcode('[smartslider2 slider="1" tablet="0" phone="0"]'); ?>

Or you can mix it:

<?php echo do_shortcode('[smartslider2 slider="1" tablet="-1" phone="0"]'); ?>
<?php echo do_shortcode('[smartslider2 slider="1" tablet="2" phone="-1"]'); ?>