I need to embed the Contact Form 7 shortcode in HTML. I've tried the following, but it's not rendering for some reason:
<div class="services-contact">
<?php echo do_shortcode('[contact-form-7 id="1442" title="Service 1"]'); ?>
</div>
What am I doing wrong?
EDIT: When I do the inspect, the code gets commented out in HTML.
your method is correct but you can also try this
apply_filters('the_content','[contact-form-7 id="1442" title="Service 1"]')also please make sure there is a contact form 7 exists with the id, '1442'