• Resolved Charcollins1

    (@charcollins1)


    I have managed to insert the layer slider into the appearance editor however i dont know how to fix the code so that it only shows on one page for example on the ‘about us’ page.
    The code im using is <p><div id=”areaslider”><?= do_shortcode(‘[layerslider id=”6″]’); ?></div></p>
    </div>

    Pleaseee help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • LayerSlider is a commercial plugin and you should really contact the plugin author.
    EDIT: can’t you just create a slide and add it to the desired page by using the generated shortcode? [layerslider id="1"]

    here is a piece of the documentation (in original broken english 😉 which might help you:
    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 is a PHP function with filtering options which you can call for example from the header.php file of your theme and it inserts your slider into your home page or certail other pages depending on your filtering settings. Here is the function definition:

    layerslider ( mixed $sliderID [, string $pages] )

    The $sliderID parameter can be found on the plugin page in the slider list view at the first table column.

    The $pages parameter is a comma separated list of pages either by name or the ID of the pages. If you are unsure about your page names or IDs, look at their URL, it is the last component.

    There is a special page name, the “homepage”, with you can filter LayerSlider WP to display the slider on your home page. It is also works if you set up a static custom page instead of the default post listing.

    The follwing examples are all valid, you can use either of these, you can even mix them on your own needs:

    <?php layerslider(1); ?> // Displays the first slider on every page
    <?php layerslider(1, ‘homepage’); ?> // Displays the first slider only on your home page
    <?php layerslider(1, ‘my-custom-post-title’); ?> // Displays the first slider on a custom page by name
    <?php layerslider(2, ‘1369’); ?> // Diplays the second slider on a custom page by ID
    <?php layerslider(3, ‘homepage,about-us,1234’); ?> // Displays the third slider on multiple pages

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to insert layer slider on to a single page’ is closed to new replies.