title: Remove Contact Form 7 CSS and JS Unless Contact form 7 shortcode is used in the page
body: <p>I want to show the css and javascript only when the shortcode is used in that page. If the short code not present in the wordpress page then the js and css of contact form should not be shown. For that what i have done is i have pasted the following code in my active themes function.php file.</p>
  
  <pre><code>add_filter( 'wpcf7_load_js', '__return_false' );
  add_filter( 'wpcf7_load_css', '__return_false' );
  </code></pre>
  
  <p>The above code totally removes the js and css of contact form 7 plugin. What i need is if contact form 7 shortcode is pasted then both should be shown.</p>