using shortcode to insert contact form-7 (5 posts)

  1. seo.chris
    Posted 3 years ago #

    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"]"); ?>


    once i insert that code, the webpage will no longer load. anyone know of any solutions?


  2. govpatel
    Posted 3 years ago #

    You need add the short code in editor where ever you want the Contact Us Form No need to add in template.

  3. Andrew Bartel
    Posted 3 years ago #

    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"]'); ?>

  4. laine930
    Posted 3 years ago #

    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

  5. laine930
    Posted 3 years ago #

    sorry shortcode for contact form is for reinventyourgenius.com

Topic Closed

This topic has been closed to new replies.

About this Topic