How to embed Slider using PHP function

For embedding the Slider into the theme files you should use motoPressSlider($alias) function

Function parameters:

$alias
(string) –  unique alias of a slider. It allows Latin symbols, numbers, hyphen and underscore.

You can find the alias of slider on Slider Settings page.

mps-alias.jpg

Here is an example of adding slider with alias slider1

<?php  motoPressSlider('slider1'); ?>

2 Replies to “How to embed Slider using PHP function”

  1. Hi, after completing settings and creating slides, how can it be used in the page?

    1. Hi,
      In order to add slider to page or post you do not need to embed it using PHP function. You should just go to edit any page and find dropdown icon ‘Slider’ at TinyMCE Editor. Select your slider and click on it.
      Or you can go to settings of certain slider, copy the shortcode and paste to page or post.

Comments are closed.