Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //* Do NOT include the opening php tag above
- /**
- *
- * Remove Contact Form 7 CSS stylesheet from all pages except where needed.
- *
- */
- add_action('wp_print_styles', 'rrd_remove_cf7_css');
- function rrd_remove_cf7_css() {
- if ( function_exists( 'wpcf7_enqueue_styles' ) ) {
- if ( !is_page('contact')) { //replace the slug if needed
- wp_deregister_style('contact-form-7');
- }
- }
- }
Add Comment
Please, Sign In to add comment