WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
How to use Contact Form 7 with custom post types? (2 posts)

  1. happyproff
    Member
    Posted 3 years ago #

    Hello.

    I try to insert form in post created via custom post types, but on front-end i see [contact-form 1 "Test"].

    How to use Contact Form 7 with custom post types?

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

  2. fireproofsocks
    Member
    Posted 3 years ago #

    It's no different than regular posts, but remember that shortcodes are ONLY parsed when they appear inside the main content block, so if your custom post type doesn't use the "editor" (as it's referred do by register_post_type() ), then you won't be able to use this.

    And just make sure your theme file actually uses the loop:

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <?php the_content();  // <-- your form should appear here ?>
    <?php endwhile; // end of the loop.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic