Title: Breaking Carousel
Last modified: March 8, 2022

---

# Breaking Carousel

 *  [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/breaking-carousel/)
 * The below action in the plugin:
 * add_action( ‘woocommerce_after_shop_loop_item’, ‘gtm4wp_woocommerce_after_shop_loop_item’);
 * Is breaking a carousel on the website as it is inserting an extra HTML element
   that the carousel is treating as a slide.
 * I can manually change it to:
 * add_action( ‘woocommerce_after_shop_loop_item_title’, ‘gtm4wp_woocommerce_after_shop_loop_item’);
 * But this means modifying the plugins core code. Is there another way around this
   so that my change sticks when the plugin is updated?

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15438358)
 * Hi,
 * How exactly is this breaking the site?
    I most cases, the issue comes down to
   a CSS rule that needs a change to make your site and the plugin to work.
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15491546)
 * The element that is being added is being treated by Owl Carousel as a new slide
   as shown in the source code here – [https://i.imgur.com/FOhdzJY.png](https://i.imgur.com/FOhdzJY.png)
 * Can’t get rid of this with CSS as the slides are created with the JS when the
   page loads.
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15492926)
 * Hi,
 * I see now and understand the issue.
    I am sorry but I won’t be able to help in
   that particular case right now.
 * I have plans to replace this span element with background AJAX calls but that
   needs in depth changes in the code.
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15492973)
 * Damn, I have altered line #1261 of “integration/woocommerce.php” to the below:
 * `add_action( 'woocommerce_after_shop_loop_item_title', 'gtm4wp_woocommerce_after_shop_loop_item');`
 * And this has solved the problem.
 * Is this valid and can I alter the action via a child theme somehow?
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15492994)
 * Hi,
 * Oh, that is wonderful!
 * You can check whether this is valid by checking the data layer on your website.
   
   If the view_item_list event is populated with the correct product attributes,
   then it should be fine.
 * But you will need to update this line each time you update the plugin.
    If it
   works for you, I will introduce an option in plugin settings to select the proper
   hook for that.
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15494957)
 * Hi Thomas,
 * Did a check and it looks like it is working fine:
 * > [View post on imgur.com](https://imgur.com/HdZ2Zj0)
 * Any ideas when this change would be pushed live? 🙂
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15497721)
 * Hi,
 * I know you might expect an answer like ‘very soon’ but I am currently working
   on releasing v1.15 without adding anything new. This seems to be possible next
   week or worst case the week after next week.
 * Then there is usually a 1-2 week period where I usually focus on fixing bugs 
   that weren’t surfaced during the beta period. If everything goes fine, I start
   working on v1.16 after that, so around the end of April.
 * But: since this is an open source project, you can also help me adding this as
   soon as possible if you send a PR on the GitHub project page 🙂
    [https://github.com/duracelltomi/gtm4wp](https://github.com/duracelltomi/gtm4wp)
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15502293)
 * You don’t want my terrible coding in there, I think it best to leave it to you.
   🙂
 * Thanks for the update.
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/breaking-carousel/#post-15577429)
 * Hi Thomas,
 * Does the latest version include a fix for this issue? Didn’t want to upload and
   delete my hardcoded fix 🙂
 * Thanks,
    Joe
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years ago](https://wordpress.org/support/topic/breaking-carousel/#post-15659439)
 * Any news on this?
 *  [ayw18](https://wordpress.org/support/users/ayw18/)
 * (@ayw18)
 * [4 years ago](https://wordpress.org/support/topic/breaking-carousel/#post-15662797)
 * Got the same problem.
 * The tweak as mentioned earlier by [@engineroom](https://wordpress.org/support/users/engineroom/)
   also seems to work fine in the latest version of the plugin. Only this time the
   alternate code should be on line #1275.
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [4 years ago](https://wordpress.org/support/topic/breaking-carousel/#post-15722252)
 * Hi [@duracelltomi](https://wordpress.org/support/users/duracelltomi/),
 * Do you think this change will be integrated into the core code with an up and
   coming release?
 * Thanks,
    Joe
 *  Thread Starter [engineroom](https://wordpress.org/support/users/engineroom/)
 * (@engineroom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-15773452)
 * Any news, sorry to keep chasing. [@duracelltomi](https://wordpress.org/support/users/duracelltomi/)
 *  [enjindev](https://wordpress.org/support/users/enjindev/)
 * (@enjindev)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-16172620)
 * Hi, found out this post while posting a new support ticket : [https://wordpress.org/support/topic/duplicated-owl-item-for-carousels/](https://wordpress.org/support/topic/duplicated-owl-item-for-carousels/)
 * Thank you [@engineroom](https://wordpress.org/support/users/engineroom/) for 
   the fix, still working. But as mentioned by others, when can we expect it to 
   be on an update ? Because each time your plugin will be updated, we’ll loose 
   the fix…

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Breaking Carousel’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 14 replies
 * 4 participants
 * Last reply from: [enjindev](https://wordpress.org/support/users/enjindev/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/breaking-carousel/#post-16172620)
 * Status: not resolved