feedback

Contact form 7 PHP Invocation Code

Contact form 7 is one of the most popular plugins for Wordpress. Currently it’s 6th most downloaded plugin for Wordpress. It’s very customizable at it can be easily integrated in posts and pages. That’s great but people sometimes want to integrate it in sidebar, header or footer so that it can be accessed on multiply pages. Looking at the code of plugin I found out that you need to use just a couple of lines of code to do that, just copy/paste this code:

<?php
global $wpcf7_contact_form;
if ( ! ( $wpcf7_contact_form = wpcf7_contact_form( 1 ) ) )
return 'Contact form not found!';
$form = $wpcf7_contact_form->form_html();
echo $form;
?>

Just change the number 1 in wpcf7_contact_form( 1 ) to number of your contact form you need.

Related posts:

  1. Beautiful Wordpress contact form
  2. Increasing a page rank of wordpress blogs
  3. About author at the end of the post
  4. How to make tabbed widget for Wordpress
  5. How to use su.pr with Wordpress
Digg icon Delicous icon Stumbleupon icon Reddit icon Twitter icon Facebook icon Technorati icon

About author

I'm Devic Bojan a student of Information Technology form Bosnia and Herzegovina. I love free and open software and any kind of programming.
More about Bojan

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

3 Comments to Contact form 7 PHP Invocation Code

  1. 13. December 2009. at 14:38 | Permalink

    I just want to tell you that your blog is very interesting, bookmarked

  2. 2. February 2010. at 05:18 | Permalink

    There is obviously a lot to learn. There are some good points here.

  3. 2. February 2010. at 12:07 | Permalink

    Good work buddy , keep us posting

Leave a Reply

You can use some HTML tags

Lacehost
Codecanyon
Fotolia
Advertise here

Tweet, tweet

Twitter bird

"Been lazy the whole day and now need to learn at 11pm"

Follow Bojan on Twitter!!

Random Quote

quote openI’ve finally learned what ‘upward compatible’ means. It means we get to keep all our old mistakes.quote end
by Dennie van Tassel

Tag cloud