Title: Conditioning JS and CSS load
Last modified: March 22, 2017

---

# Conditioning JS and CSS load

 *  [spacebom](https://wordpress.org/support/users/spacebom/)
 * (@spacebom)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/conditioning-js-and-css-load/)
 * I am apply the filters and code explained here: [https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/](https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/)
   to load the files just on pages which contain contact forms.
 * This is the code that i am using:
 *     ```
       add_filter( 'wpcf7_load_js', '__return_false' );
       add_filter( 'wpcf7_load_css', '__return_false' );
   
       if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
       	if ( is_page('descargas') || is_page('contactar') ) {
       		wpcf7_enqueue_scripts();
       	}
       }
       if ( function_exists( 'wpcf7_enqueue_styles' ) ) {
       	if ( is_page('descargas') || is_page('contactar') ) {
       		wpcf7_enqueue_styles();
       	}
       }
       ```
   
 * For this page: [https://goo.gl/7Jdbzc](https://goo.gl/7Jdbzc)
 * But like you see, this page doesn’t load CF7 CSS or JS, BUT form works fine, 
   it is ok??
 * Thank you.

The topic ‘Conditioning JS and CSS load’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 0 replies
 * 1 participant
 * Last reply from: [spacebom](https://wordpress.org/support/users/spacebom/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/conditioning-js-and-css-load/)
 * Status: not resolved