Support » Plugin: Contact Form 7 » Special mail tags doesn't work in custom post types

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    It should work. How have you made the custom post type page?

    Hi Takayuki,

    Thank you for your answer.

    Yes, I’ve created custom port type’s pages.
    I’ve tried including the form in the template and in the_content().
    But in both cases, when I want to receive the post title in the mail, I just receive [_post_title].
    The other part of the message are ok but not the special mail tag.

    I’ve also tried in post or pages and it works correctly.

    I don’t know why.

    this happens for me too, does anybody know why?
    posts and pages work fine but custom post types get just [_post_title] back.

    my code is:
    <?php if ( is_user_logged_in() ) {
    echo do_shortcode( ‘[contact-form-7 id=”146″ title=”italiano”]’ );
    }
    ?>

    and CPT is mada using TYPES

    Thanks for the help, ciao

    Alessandro

    SOLVED:

    do_shortcode has to be within the loop!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Special mail tags doesn't work in custom post types’ is closed to new replies.