Created
September 24, 2013 16:30
-
-
Save jbutko/6687391 to your computer and use it in GitHub Desktop.
PHP, WP, Contact Form 7: Echo Contact Form 7 form if it is installed (if function_exists)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (function_exists('wpcf7')) { | |
echo do_shortcode( '[contact-form-7 id="413" title="Contact form 1"]' ); | |
} else { | |
echo "<p class='title'>Please install <a href='http://wordpress.org/plugins/contact-form-7/' rel='nofollow'>Contact Form 7</a> plugin and build some contact form. Then use your shortcode on the contact page.</p>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment