Title: [Plugin: Contact Form 7] plugin code not working sidebar.php
Last modified: August 19, 2016

---

# [Plugin: Contact Form 7] plugin code not working sidebar.php

 *  Resolved [girlfriendinacoma](https://wordpress.org/support/users/girlfriendinacoma/)
 * (@girlfriendinacoma)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-plugin-code-not-working-sidebarphp/)
 * I’m using Contact Form 7 just fine on a page that is configured through wordpress
   but I created a second form in the plug-in and the code does not work when added
   to sidebar.php. Is there something special I need to add in so [contact-form 
   2 "Subscribe"] can be parsed properly?
 * [http://wordpress.org/extend/plugins/contact-form-7/](http://wordpress.org/extend/plugins/contact-form-7/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [girlfriendinacoma](https://wordpress.org/support/users/girlfriendinacoma/)
 * (@girlfriendinacoma)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-plugin-code-not-working-sidebarphp/#post-1205771)
 * I figured this out..
 * Use the contact form 7 plugin to create a form.
 * Create a private page and call the plugin.
 * Visit the page and view the source code.
 * Copy the source code into the sidebar.php and presto.
 *  [kirkward](https://wordpress.org/support/users/kirkward/)
 * (@kirkward)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-plugin-code-not-working-sidebarphp/#post-1205897)
 * GirlFriend … you’re a genius. That sounds like it will work. I’ll try it out,
   after I fix my db where CF7 broke it. LOL
 *  [dplatt](https://wordpress.org/support/users/dplatt/)
 * (@dplatt)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-plugin-code-not-working-sidebarphp/#post-1205933)
 * If you want to place the shortcode outside of a post, like in the sidebar you
   can use “do_shortcode”. Using the source code works, but may not upgrade when
   Contact for 7 upgrades.
 * Example code
    <?php echo do_shortcode(“[contact-form 1 'Contact form 1']“); ?
   >
 * More details see this post
    [http://wordpress.org/support/topic/297117?replies=15#post-1221565](http://wordpress.org/support/topic/297117?replies=15#post-1221565)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Contact Form 7] plugin code not working sidebar.php’ is closed
to new replies.

 * 3 replies
 * 3 participants
 * Last reply from: [dplatt](https://wordpress.org/support/users/dplatt/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-plugin-code-not-working-sidebarphp/#post-1205933)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
