Skip to content

Instantly share code, notes, and snippets.

@daronspence
Created March 25, 2015 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daronspence/49c2d82a3aa79f9c799d to your computer and use it in GitHub Desktop.
Save daronspence/49c2d82a3aa79f9c799d to your computer and use it in GitHub Desktop.
add_action('wp_head', function(){
global $posts;
foreach ( $posts as $post ){
if ( strpos($post->post_content,'[acfe_form') !== false ){
echo 'Contains the shortcode<br>'; // now do acf_form_head()
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment