How to create a condition with Contact Form 7?


I am developing a WordPress theme where I need to show a contact form 7. I want to show a simple contact form if it exists, otherwise, want to show a text like ‘there is no contact form. Create one.’

If I want to make it through an if-else statement what will be the condition?


    if (what will be the condition?) {
       <?php echo do_shortcode('[the-contact-form-shortcode]') ?>
} else {
      echo "You need to create a contact form first."

Please help. Thanks in advance.

Sourav Pal 5 months 2022-06-30T03:32:55-05:00 0 Answers 0 views 0

Leave an answer