Support

Account

Forum Replies Created

  • Revision:

    
    function text_area_shortcode($value, $post_id, $field) {
      if (is_admin()) {
        // don't do this in the admin
        // could have unintended side effects
    
        // revision: return $value because we don't want to miss on the textarea content
        return $value;
      }
    
      return do_shortcode($value);
    }
    add_filter('acf/load_value/type=textarea', 'text_area_shortcode', 10, 3);
    
  • @hube2’s code has a bug. Corrected code

    
    function text_area_shortcode($value, $post_id, $field) {
      if (is_admin()) {
        // don't do this in the admin
        // could have unintended side effects
        return;
      }
    
      return do_shortcode($value);
    }
    add_filter('acf/load_value/type=textarea', 'text_area_shortcode', 10, 3);
    
Viewing 2 posts - 1 through 2 (of 2 total)