disable oceanwp lightbox
/**
* Disable the Lightbox scripts
*/
function my_enqueue_scripts() {
// Unregister JS files
wp_deregister_script( 'magnific-popup' );
wp_deregister_script( 'oceanwp-lightbox' );
// Unregister CSS file
wp_deregister_style( 'magnific-popup' );
}
add_action( 'wp_enqueue_scripts', 'my_enqueue_scripts', 99 );
/**
* Add the no-lightbox class in the body tag
*/
function my_body_classes( $classes ) {
$classes[] = 'no-lightbox';
// Return classes
return $classes;
}
add_filter( 'body_class', 'my_body_classes' );