SeanChoice
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Storefront] How do I make an image slider full width?Excellent, thanks so much for your reply.
Worked a treat 🙂Perfect, thanks a lot for your help Dave 🙂
Forum: Themes and Templates
In reply to: [Storefront] Restricing Slider to Storefront Home Page only?Great, thanks jameskoster.
This seemed to do the trick:
[metaslider id=XXX restrict_to=home]Forum: Themes and Templates
In reply to: [Storefront] How do I make an image slider full width?Hi @wooassist
I’ve inserted the code you wrote above into my Storefront Child theme functions.php file and all works great for making the images 100% width.
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
}The problem I now have it that the Meta Slider populates every page on my website, so how could I restrict this to just the Home Page only?
Thanks in advance.
Sean