Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make meta slider full width for storefront
add_action( 'init', 'child_theme_init' );
function child_theme_init() {
add_action( 'storefront_before_content', 'woa_add_full_slider', 5 );
}
function woa_add_full_slider() { ?>
<div id="slider">
<?php echo do_shortcode("[metaslider id=388 percentwidth=100]"); ?>
</div>
<?php
}
@yumiko7

This comment has been minimized.

Copy link

commented Mar 22, 2018

Hi jamiemarsland,
Thank you for posting this code. It works great except that it makes the slider appear on all pages. Can you modify the code so the slider shows up only on homepage, please? Much appreciated.

@yumiko7

This comment has been minimized.

Copy link

commented Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.