Support

Account

Home Forums General Issues How can I output shortcode from an input field?

Helping

How can I output shortcode from an input field?

  • Okay, this should be simple, but it’s not.

    I create a custom page template in WordPress. The user can go in, create a new page, and one of the ACF fields on the page asks the user to input their custom Gravity Forms shortcode to display on the page.

    The issue is that when you enter a shortcode in any field (whether it be a text field, text area, WYSIWYG, etc.) it doesn’t output the shortcode using the standard ACF code like so:

    <?php the_field('webinar_registration_form_short_code'); ?>

    What am I missing?

  • <?php do_shortcode(get_field('webinar_registration_form_short_code')); ?>

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How can I output shortcode from an input field?’ is closed to new replies.