wordpress my_deregister plugin from page
- by musiC addicted
i try to use the next code to load cforms II plugin only on my CONTACT PAGE
(http://www.deliciousdays.com/cforms-plugin/)
#/template/functions.php
add_action( 'wp_print_scripts', ' ', 100 );
function my_deregister_javascript() {
if ( !is_page('Contact') ) {
wp_deregister_script( 'cforms' );
}
}
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
function my_deregister_styles() {
if ( !is_page('contact') ) {
wp_deregister_style( 'cforms' );
wp_deregister_style( 'style' );
}
}
but doesn't work
the code worked for contact form 7
( http://wordpress.org/extend/plugins/contact-form-7/)