24Jan/105
Loading Contact-Form-7 Plugin Outside Post/Page/The_Loop
Hi, just want to share little snippet. I was developing wordpress site for my client and I want to use Contact-Form-7 (CF7) to speed-up my development time. I need to add form (custom form) outside the loop / post / page content. From CF7's documentation, there's no single text explaining how to do it.
So, I guess I have to get my hand dirty by crawling the code. Here's how I do that.
From anywhere on wordpress theme files, put this code to display your CF7 form:
<?php echo do_shortcode ( '[contact-form 2 "Banquet Inquires"]' ); ?>






February 26th, 2010 - 09:25
Thats exactly what I was looking for. I want to display a form in my category templates. Took me all afternoon to find this answer. Thank you.
February 27th, 2010 - 09:12
your welcome. Glad that helped!
March 9th, 2010 - 21:40
Thanks so much for thsi bit of code, exactly what I was looking for, you rock!
July 10th, 2010 - 01:58
Oh wow, thank you so much. You have no idea how much you helped me by posting this. I just spent 90 minutes fighting to integrate a regular CGI form script into my template (with no luck) and this just saved my day.
July 27th, 2010 - 18:30
You. Rock. Thanks!