Support

Account

Home Forums General Issues How to add a shortcode (from the Contact Form7)?

Unread

How to add a shortcode (from the Contact Form7)?

  • Hi folks,

    I try to transfer this shortcode from the WordPress Contact Form7-Plugin: [contact-form-7 id=”36″ title=”Kontaktformular 1″]. I have created a ACF-customfield called “kontakt” and a page-template “page-kontakt.php” with the following code:

    `<?php while ( have_posts() ) : the_post(); ?>
    <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, ‘kontakt’, true); wp_reset_query(); ?>
    <?php endwhile; // end of the loop. ?>`

    Right now the browser doesn’t compile shortcode [contact-form-7 id=”36″ title=”Kontaktformular 1″] in the kontakt-customfield;-(

    Have you got a hint for me?

    Kind regards in advance
    Thomas

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.