Title: Re init slider code
Last modified: January 9, 2022

---

# Re init slider code

 *  [eperalta](https://wordpress.org/support/users/eperalta/)
 * (@eperalta)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/re-init-slider-code/)
 * Hello! i am using your plugin to show related products by tag `function v_woo_related_slider(){
   
   if (is_product()) {?> <script> jQuery(document).ready(function($) { $(“#woorelatedproducts”).
   data(‘owlCarousel’).destroy(); var owl = $(“#woorelatedproducts”); owl.owlCarousel({
   items : 4, itemsDesktop : [1000,3], itemsDesktopSmall : [900,3], itemsTablet:[
   600,2], autoPlay: 3500, itemsMobile : false, }); }); </script> <?php } } add_action(‘
   wp_footer’, ‘v_woo_related_slider’ );` my theme is flatsome and i am having issues
   with the wp_footer function (as the site is already in production i have removed
   the code) what i need to do is to prevent owl slider to move, and remove the 
   touch action in mobile do you think that you could help me with this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fre-init-slider-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [peachpay](https://wordpress.org/support/users/peachpay/)
 * (@peachpay)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/re-init-slider-code/#post-15356976)
 * Hi [@eperalta](https://wordpress.org/support/users/eperalta/)!
 * The documentation for the Owl Carousel mentions two options that might be able
   to help: [http://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html](http://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html)
 * `rewindNav` set to `false` should prevent the moving, as long as all items are
   showing.
 * `touchDrag` set to `false` should remove the touch action on mobile.
 * This plugin uses Owl Carousel 1, whereas the documentation is for Owl Carousel
   2. That’s why there is no `rewindNav` option listed on the page, but I am pretty
   such that’s what it’s called in version 1.

Viewing 1 replies (of 1 total)

The topic ‘Re init slider code’ is closed to new replies.

 * ![](https://ps.w.org/woo-related-products-refresh-on-reload/assets/icon-256x256.
   png?rev=1531812)
 * [Related Products for WooCommerce](https://wordpress.org/plugins/woo-related-products-refresh-on-reload/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-related-products-refresh-on-reload/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-related-products-refresh-on-reload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-related-products-refresh-on-reload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-related-products-refresh-on-reload/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [peachpay](https://wordpress.org/support/users/peachpay/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/re-init-slider-code/#post-15356976)
 * Status: not resolved