JS Composer shortcode is not working outside the loop, sometimes the JS file is not enqueue to your front end page. Mine is I’m using the Ultimate_VC_Addons and I found the ultimate.min.js and ultimate.min.css is not enqueue to the page.
To fix the error, copy this code to your functions.php
add_action( 'wp_enqueue_scripts', 'ac_wp_enqueue_scripts' ); function ac_wp_enqueue_scripts() { if ( wp_script_is( 'ultimate-script', 'enqueued' ) ) { }else{ wp_enqueue_script( 'ultimate-style-min', 'http://sample-site.com/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/ultimate.min.js', array() ); } if ( ! wp_style_is( $scripthandle, 'enqueued' ) ) { wp_enqueue_style( 'ultimate-style-min', 'http://sample-site.com/wp-content/plugins/Ultimate_VC_Addons/assets/min-css/ultimate.min.css' ); } }
Leave a Reply