Last active
January 16, 2021 14:29
-
-
Save ibndawood/68b5c66393b6a1d58646ec56b87516e1 to your computer and use it in GitHub Desktop.
Electro v2 - Load RTL flexslider from WooCommerce and dequeue WP Bakery Page Builder flexslider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'ec_child_dequeue_js_composer_flexslider', PHP_INT_MAX ); | |
function ec_child_dequeue_js_composer_flexslider() { | |
if ( is_rtl() && is_woocommerce_activated() ) { | |
wp_dequeue_script( 'flexslider' ); | |
$flexslider = array( | |
'handle' => 'wc-flexslider', | |
'src' => plugins_url( 'assets/js/flexslider/jquery.flexslider.min.js' , WC_PLUGIN_FILE ), | |
'deps' => array( 'jquery' ), | |
'version' => '2.7.2', | |
); | |
wp_register_script( $flexslider['handle'], $flexslider['src'], $flexslider['deps'], $flexslider['version'], true ); | |
wp_enqueue_script( $flexslider['handle'] ); | |
} | |
} |
Please add the above code in your child theme's functions.php
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Support,
Kindly, can you explain more the process, I have update the theme , and now images not showing with RTL.
Regards.