• Resolved Luvlymedia

    (@nashakaratv)


    Hi Guys,

    I would like to find out how I can get the slider to display on my homepage only.

    I am using a static homepage and I have tried using the following code to do this task:

    <?php
    if (is_front_page() || is_home()) {
    echo do_shortcode(“[metaslider id=165]”);
    }

    ?>

    This works, however it still shows the slider on the blog page.
    I DO NOT want it on the blog page either.

    Is there a way to do this?

    Thanks,

    https://wordpress.org/plugins/ml-slider/

Viewing 2 replies - 1 through 2 (of 2 total)
  • matchalabs

    (@matchalabs)

    Hi nashakaratv,

    Try using just this instead:

    if (is_front_page()) {
    echo do_shortcode("[metaslider id=165]");
    }

    Or

    if (is_home()) {
    echo do_shortcode("[metaslider id=165]");
    }

    Regards,
    Tom

    Thread Starter Luvlymedia

    (@nashakaratv)

    Works Perfect!

    Thanks TOM!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display slider on homepage only’ is closed to new replies.