WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] contact form not showing up (10 posts)

  1. wiwilala
    Member
    Posted 1 year ago #

    Helow,
    i am using contact form 7 3.2.1 on wordpress 3.4.2, copy and paste the folowing code [contact-form-7 id="143" title="Contact form 1"] on a page with custom template and the code just gets spit out.

    I have tryied embeding the code in template file like following -> <?php echo do_shortcode( '[contact-form-7 id="1234" title="Contact form 1"]' ); ?> and nothing. Deactivating all plugins and nothing, reinstaling contact form and nothing!

    I have many sites with custom template and contact form, but no problem since now.

    Any idea???

    LP

    site is -> http://wiwi.si/o-projektu/

    http://wordpress.org/extend/plugins/contact-form-7/

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    What happens if you use the shortcode in a default template page using Twenty Eleven?

  3. wiwilala
    Member
    Posted 1 year ago #

    using Twenty Eleven the contact form is working, but how is that going to help me find out why isnt working on a custom template? Thanks for reply!

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    It sounds like the issue is in your custom page template. What are you using to display the page content?

  5. wiwilala
    Member
    Posted 1 year ago #

    <div id="oprojektu2">
    <?php query_posts("posts_per_page=1&post_type=page&page_id=14"); the_post(); ?>
    		<h3  class="floatleft"><?php the_title(); ?></h3>
    		<p class="floatleft"><?php echo get_the_content(); ?></p>
    
    </div>
  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Don't use get_the_content(). Try using the_content() instead.

  7. wiwilala
    Member
    Posted 1 year ago #

    yes, that's it! Thank you, what a simple solution! Do you know whay is that?

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    the_content() function doesn't just get the page's content from the database. It pre-processes it via a number of WordPress core filters before displaying it. One of those filters expands all shortcodes and that's the bit that you were missing previously.

  9. wiwilala
    Member
    Posted 1 year ago #

    Thanks!!!

  10. ellenshershow
    Member
    Posted 1 year ago #

    Hello,

    I am having a similar problem, but I'm not sure I understand the answer. I do not know very much about coding, perhaps you can help me?

    I just installed contact form 7, and I am pasting the short code from my wordpress admin into a custom page.

    Here is the code I am pasting in:

    [contact-form-7 id="180" title="Contact form 1"]

    Instead of showing up as a form, I get this:

    [contact-form-7 404 "Not Found"]

    I have Contact Form 7 3.3 installed and wordpress 3.4

    Initially, I had 'Contact Form 7 - Customfield in mail' installed, but I de-activated that too see if that was the problem and nothing changed.

    I have also tried pasting this code into HTML, but had no luck there either....

    Any ideas on what might be causing this? How can I correct it? You mention a Twenty Eleven, I do not know what that is....?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic