Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you create your slider there are several ways to add it to a page which will be explained below.

Inserting the slider with shortcode

To insert the slider, edit a page or post and click on "Master Slider button" on WordPress editor, then select a slider from the list. The slider shortcode will be added to WordPress editor, publish the page and you are done.

The figure below shows these options on Master Slider panel.

Inserting the slider with the Master Slider WP widget

MasterSlider WP supports widgets, so you can place your slider in your front-end page just by a drag n' drop. To do that, navigate to the Appearance menu on the sidebar on the left, and select "Widgets". Grab the MasterSlider WP Widget and drop it into one of your widget areas. Please note that some themes may not support a widget area that you need. In this case, you can create a new widget area by editing your theme files. ** CR

Calling the slider from your theme files

Because a slider can be an integral part of your site, you may want to place it into your theme files. There are some PHP functions which you can call. For example, from the " header.php " file of your theme and it inserts your slider into your home page or certain other pages. Here they are :

Code Block
languagephp
<?php masterslider ( $slider_id ); ?>

or

Code Block
languagephp
<?php echo get_masterslider ( $slider_id ); ?>


Those, display MasterSlider based on the slider id passed to.

(info) It is important when you want to insert a slider to check its to check the slider's ID on the MasterSlider WP slider list page, when you want to insert a slider. When you removes remove some sliders, their IDs won't be re-indexed and the sequence may broke break up. This is important to keep persistent your the existing sliders preventing from unwanted changes on the already inserted ones.