How to create a condition with Contact Form 7?
Question
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?
Suppose,
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.
0
2 months
2022-06-30T03:32:55-05:00
2022-06-30T03:32:55-05:00 0 Answers
0 views
0
Leave an answer