Tagged: x
-
AuthorPosts
-
July 29, 2016 at 1:11 pm #1109155
MaceInyerFaceParticipantHi ~
I’d like to add a LayerSlider to each of the woocommerce pages. I understand there is not a way to do this with Cornerstone, but is there a css solution to add this element under the masthead?
If you visit the site below, you’ll see that the layerslider is lost on all the Woocommerce related pages:
http://beta.strategicpreventionsolutions.com
Thanks,
July 29, 2016 at 5:14 pm #1109444
DarshanaModeratorHi there,
Thanks for writing in! Could you please provide sample page URLs where you expect to add LayerSlider, so that we should be able to assist you with a custom workaround.
Thanks!
July 29, 2016 at 5:46 pm #1109463
MaceInyerFaceParticipantHi ~
For example:
http://beta.strategicpreventionsolutions.com/shop/
http://beta.strategicpreventionsolutions.com/cart/Thanks again,
July 29, 2016 at 9:38 pm #1109746
Rue NelModeratorHello There,
Thanks for writing in! To resolve this issue, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Add custom layerslider below the masthead // ============================================================================= function custom_slider_below_masthead() { ?> <?php if ( is_shop() || is_cart() ) : ?> <div class="custom-slider"> <?php echo do_shortcode('[layerslider id="1"]'); ?> </div> <?php endif; ?> <?php } add_action('x_after_view_global__slider-below', 'custom_slider_below_masthead'); // =============================================================================Please supply the correct layerslider shortcode.
We would loved to know if this has work for you. Thank you.
July 30, 2016 at 2:15 pm #1110325
MaceInyerFaceParticipantHi ~
Yes!
Perfect. I also needed it on the checkout page, but that was fairly easy to add in based on your provided code.
// Add custom layerslider below the masthead
// =============================================================================
function custom_slider_below_masthead() { ?>
<?php if ( is_shop() || is_cart() || is_checkout() ) : ?>
<div class=”custom-slider”>
<?php echo do_shortcode(‘[layerslider id=”1″]’); ?>
</div>
<?php endif; ?>
<?php }
add_action(‘x_after_view_global__slider-below’, ‘custom_slider_below_masthead’);
// =============================================================================Thanks so much,
July 30, 2016 at 4:45 pm #1110400
MaceInyerFaceParticipantIn case anyone runs into this same problem, I also ended up needing it to display on the individual product pages – which was an other easy addition to the above code:
// =============================================================================
function custom_slider_below_masthead() { ?>
<?php if ( is_shop() || is_cart() || is_checkout() || is_product() ) : ?>
<div class=”custom-slider”>
<?php echo do_shortcode(‘[layerslider id=”1″]’); ?>
</div>
<?php endif; ?>
<?php }
add_action(‘x_after_view_global__slider-below’, ‘custom_slider_below_masthead’);
// =============================================================================July 30, 2016 at 9:59 pm #1110593
Rue NelModeratorHey There,
You’re welcome! We are just glad we were able to help you out.
Thanks for letting us know that it has worked for you.If you need anything else we can help you with, don’t hesitate to open another thread.
Cheers.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1109155 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
