Support

Account

Home Forums General Issues Custom Text Field Won't Output Shortcode Data Reply To: Custom Text Field Won't Output Shortcode Data

  • That depends on where you want it to appear. Most of the time when using shortcodes it because you’re putting them in the middle of content in the wysiwyg editor. If it will appear in a specific place, either before or after the content, then I would use PHP. On the other hand, if you need it to be in the middle of the content somewhere then building a shortcode is pretty much the only option.

    If you can do it with simple php then this is all you should need and you can even remove the filter to run shortcodes on textarea fields.

    
    echo do_shortcode(get_field('field_name', 'user_'.get_current_user_id()));