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 did it, John! Thanks so much for your help. I’ll outline exactly what I did for anyone wanting to re-create this.

    1. Add a custom field in ACF. Set it to “Text” and assign the location to “User” “is equal to” “All” if you want it to appear in the user profile.
    2. Add your custom shortcode in the field in the user profile(s).
    3. Install the Insert PHP Code Snippet Plugin and add the snippet with the code example as follows, being sure to change ‘field_name’ to your ACF slug:
      echo do_shortcode(get_field('field_name', 'user_'.get_current_user_id()));
      
    4. Insert your PHP Code Snippet shortcode into your content as desired.