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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.