Dequeue scripts on frontend
-
Hi I have disabled styles from plugin settings but the “jquery.colorbox-min.js” and “custom.js” are still being added on the front-end which are enqueued at wp-rss-aggregator/includes/shortcodes.php
Shouldn’t disabling styling should disable colorbox on frontend too? Or maybe a separate checkbox in settings to disable scripts too?
The issue is that I have even tried dequeue-ing them from child-theme and they still show up on front-end.
I used a simple function in my child-theme
function theme_abc_dequeue_script() { wp_dequeue_script('jquery.colorbox-min'); wp_dequeue_script('wprss_custom'); } add_action( 'wp_print_scripts', 'theme_abc_dequeue_script', 100 );
And
function theme_xyz_dequeue_script() { wp_dequeue_script('jquery.colorbox-min'); wp_dequeue_script('wprss_custom'); } add_action( 'wp_print_footer_scripts', 'theme_xyz_dequeue_script', 100 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Dequeue scripts on frontend’ is closed to new replies.