Title: using shortcode to insert contact form-7
Last modified: August 20, 2016

---

# using shortcode to insert contact form-7

 *  [seo.chris](https://wordpress.org/support/users/seochris/)
 * (@seochris)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/)
 * greetings all,
 * im trying to insert contact form-7 into ‘home.php’ using the shortcode.
 * below is the code im using:
 * <div class=”rightbox”>
 *  <h3> insert image here </h3>
    <?php echo do_shortcode(“[contact-form-7 id=”188″
   title=”Main Contact Form”]”); ?>
 * </div>
 * once i insert that code, the webpage will no longer load. anyone know of any 
   solutions?
 * thanks.

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

 *  [govpatel](https://wordpress.org/support/users/govpatel/)
 * (@govpatel)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/#post-3239729)
 * You need add the short code in editor where ever you want the Contact Us Form
   No need to add in template.
 *  [Andrew Bartel](https://wordpress.org/support/users/andrew-bartel/)
 * (@andrew-bartel)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/#post-3239730)
 * Patel’s probably right, but if you really do want to add it to a template, I 
   suspect that your error is not escaping your double quotes.
 * So, when php parses that code, it thinks that end of what you’re passing to the
   function is the beginning of the id attribute. Try this:
    `<?php echo do_shortcode('[
   contact-form-7 id="188" title="Main Contact Form"]'); ?>`
 *  [laine930](https://wordpress.org/support/users/laine930/)
 * (@laine930)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/#post-3239791)
 * i’m trying to add a jetpack no credit check financing form in my home.php file.
   i used the id for the page i created the form on and it’s defaulting to standard
   contact form.
    ideally i want the form fields to be horizontal under the home
   page slider.
 * <?php echo do_shortcode(‘[contact-form id="226" title="No Credit Check Financing"]‘);?
   >
 * customer has been waiting on me so sooner then better. thanks so much
 *  [laine930](https://wordpress.org/support/users/laine930/)
 * (@laine930)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/#post-3239792)
 * sorry shortcode for contact form is for reinventyourgenius.com

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

The topic ‘using shortcode to insert contact form-7’ is closed to new replies.

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [laine930](https://wordpress.org/support/users/laine930/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/using-shortcode-to-insert-contact-form-7/#post-3239792)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
