WordPress.org

Forums

ContactForm 7 - Shortcodes in Custom Fields (1 post)

  1. smooth0perator
    Member
    Posted 2 years ago #

    Hi guys,

    I'm using ContactForm 7 and I'm using

    <?php $contact = get_post_meta($post->ID, 'regForm', true); ?>
    	<?php
    	$rfrm = $contact;
    	$rfrm = apply_filters('the_content', $rfrm );
    	echo $rfrm;
    	?>

    in a template to pull the shortcode from the custom field regForm.

    Problem is, it's not displaying the form. There is one other form on the page and it displays correctly. However when I use the above code it just distorts the style on the working form, yet doesn't display the second form. When I type a string into the custom field, instead of a short code, it's displayed on the page as expected and the working form's style is back to normal.

    I'm not sure what may be happening, thought maybe someone here could be in the same boat?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by smooth0perator
  • This topic is not resolved
  • WordPress version: 3.4.1