• Hi. I am using storefront with with a header metaslider (echo do_shortcode(“[metaslider id=30]”); ) – but struggle to get a meta slider to show on on specific pages.

    How can that be solved?

    I have tried with code from this page:

    My page seems to fail when i try to use the if else statement for storefront, code:


    if (is_home() || is_front_page()) : echo do_shortcode(“[metaslider id=123]”); // This is the homepage, replace 123 with your slideshow ID
    elseif ( is_page(‘page-slug’)) : echo do_shortcode(“[metaslider id=123]”); // Replace page-slug and 123 with your specific page slideshow ID respectively
    elseif ( is_page(‘another-page-slug’,’or-this-page’,’Or by page title’)) : echo do_shortcode(“[metaslider id=123]”); // You can add as many other pages as you like
    elseif ( ! empty( $header_image ) ) : ?>

Viewing 3 replies - 16 through 18 (of 18 total)
Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Meta slider integration in header for specific pages’ is closed to new replies.