-
Henry Wright replied to the topic wp_enqueue_script issue on activity page in the forum How-to & Troubleshooting 10 years, 2 months ago
If you copy and paste this into your theme’s functions.php file, it should work.
function my_dequeue_script() {
if ( bp_is_activity() )
wp_dequeue_script( 'xyz-custom-script' );
}
add_action( 'wp_print_scripts', 'my_dequeue_script', 100 );Your functions.php file will be located at:…[Read more]
-
Hugo Ashmore replied to the topic wp_enqueue_script issue on activity page in the forum How-to & Troubleshooting 10 years, 2 months ago
@albert101 try henrywrights code but you may want to change:
add_action( 'wp_enqueue_scripts', 'my_dequeue_script', 100 );
to:
add_action( 'wp_print_scripts', 'my_dequeue_script', 100 );
The latter should work.
-
Henry Wright replied to the topic wp_enqueue_script issue on activity page in the forum How-to & Troubleshooting 10 years, 2 months ago
Hello @albert101
You can use
wp_dequeue_script()
to remove an enqueued script. For example:function my_dequeue_script() {
if ( bp_is_activity() )
wp_dequeue_script( 'xyz-custom-script' );
}
add_action( 'wp_print_scripts', 'my_dequeue_script', 100 );Ref:…[Read more]
@albert101
Active 10 years, 2 months ago