Support

Account

Home Forums Backend Issues (wp-admin) Prevent oembed fields from rendering in wp-admin Reply To: Prevent oembed fields from rendering in wp-admin

  • From what I see the only way to do this is to override the acf_field_oembed class. The file is located in the plugin directory under advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php. If you copy that file to your theme somewhere and include it via the functions file you can edit the render_field function directly to remove the oembed markup that is output. Just make sure you remove the IF condition that wraps the class so that your version of the class will always override the default ACF version.

    Unfortunately there’s no hook setup for the render_field function, and the output is coded directly in that function. There definitely should be a filter available for render_field across all field types, that would make it a lot easier to customize how all fields are rendered in admin.