Woodmart slider image disappears when deferring JS
-
Hi there,
In WP Rocket settings we can defer loading of JS files. However if any of our page elements have the Woodmart theme lazy loading enabled, then they will not display. We can fix this by removing the lazy loading on these elements.
However on our home page, the top slider (Woodmart slider) also dissapears when we defer loading of JS. I tried to check if any lazy loading is enabled on the slider, but I don’t think there is an option for lazy loading on your slider.
Is there any way we can prevent the home page slider from disappearing when we defer JS? Either let me know how we can disable lazy loading on the slider, or maybe give me the JS file name responsile for that slider and I can try and exclude it from WP Rocket.
Many thanks
Can you also tell me if the “Section Divider” element from WPBakery has any JS file? When we defer JS with WP Rocket, the Section Divider on mobiles does not display correctly.
I attach a screen shot from a mobile device of the “Section Divider” when we defer JS in WP Rocket. As you can see the top nad bottom part of the divider do not stretch all the way to the screen edge (although strange that this is a JS issue). If we disable defer JS, then it works 100% correctly.
Attachments:
You must be
logged in to view attached files.
Hello,
Please find this file: woodmart\inc\shortcodes\slider.php
Then find this line:
<div id="<?php echo esc_attr( $slide_id ); ?>" class="woodmart-slide<?php echo woodmart_get_slide_class( $slide->ID ); ?>">
replace it with this line:
<div id="<?php echo esc_attr( $slide_id ); ?>" class="woodmart-slide woodmart-loaded<?php echo woodmart_get_slide_class( $slide->ID ); ?>">
Best Regards
Many thanks. Any idea about the section divider on mobile devices? See my sreenshot I showed you above.
Hello,
Section divider does not have any JS it is a static element.
Best Regards
OK so why when we defer JS, the section divider is not full width on mobile (with no paddings)?
Strange no?
Hello,
Please provide the site admin access as well as the page URL to the private area.
Best Regards
Hello Elise,
Actually this section divider is affected by JS. I have found the following JS file, and made sure it is not deferred: /wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js
That seems ot work. You can close this ticket.
If you have any questions please feel free to contact us.
Best Regards
The topic ‘Woodmart slider image disappears when deferring JS’ is closed to new replies.