Avoid loading the entire website
-
Will it be possible to load the plugin only the page where the plugin is used, instead of the whole website?
That can be done with Contactform7
`function deregister_cf7_js() {
if ( !is_page(array( ‘contacto’ ) )) {
wp_deregister_script( ‘contact-form-7’);
}
}
add_action( ‘wp_print_scripts’, ‘deregister_cf7_js’ );function deregister_ct7_styles() {
if ( !is_page(array( ‘contacto’ ) )) {
wp_deregister_style( ‘contact-form-7’);
}
}
add_action( ‘wp_print_styles’, ‘deregister_ct7_styles’);Regards
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Avoid loading the entire website’ is closed to new replies.