Recommended slideshow size: 960 x 300. Go to Appearance > Editor. Select header.php from the right. Find (line 41):
1 2 3 |
if ( ! empty( $header_image ) ) : ?> |
Replace with:
1 2 3 4 |
if (is_home() || is_front_page()) : echo do_shortcode("[metaslider id=123]"); // replace 123 with your slideshow ID elseif ( ! empty( $header_image ) ) : ?> |
Save.
If you would like to display specific sliders on specific pages then replace the original code:
1 2 3 |
if ( ! empty( $header_image ) ) : ?> |
With this:
1 2 3 4 5 6 |
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 ) ) : ?> |