• I am copying and pasting

    [contact-form 1 "Contact form 1"]

    into a custom field template, but it shows as just the plain text and not the form. If I paste it into the main wysiwyg area it shows fine. What am i doing wrong – do i have to configure the custom field tempplates? I have allready got ‘Use the shortcode in the widget’ ticked.

    Any help much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can’t use shortcodes in page templates. They have to be parsed via something like the_content(). So, edit your custom template to simply use the_content() where you want the form to appear. Then create the page via the WP Admin, assign the new template and add the contact form shortcode in the main wysiwyg area.

    Thread Starter greenday

    (@greenday)

    Hi Thanks so much for your reply. If this is what i think it means, it seriously limits WordPress as a CMS?

    Please have a quick look at my site http://myjeweller.co.nz/site/contact

    I have set the page up as 4 columns from left to right, using the custom field template for the last 3. Does this mean that only 1 column can ever contain short code such as a gallery or contact form ect? Or have I gone about this the wrong way?

    I was hoping the customer could add elements where ever they wanted easily?

    Thanks.

    it seriously limits WordPress as a CMS?

    In what way? I’ve found it works really well as a CMS.

    If you want your clients to be able to add elements to sidebars (or pages) easily, then use widgets rather than shortcodes. They can then be added to any widget-ready area.

    Hi guys,

    This worked for me:
    <?php echo do_shortcode('[contact-form 1 "Contact form 1"]'); ?>

    Hope this helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem inserting Contact Form 7 into a custom field template’ is closed to new replies.