I can’t add a class through the Wrapper Attributes field in ACF.
I have an ACF field that has a URL and returns an iFrame. The type os “oEmbed” – it looks like this:
https://imgur.com/a/4ocAq5J
What it’s a clone of looks like this:
https://imgur.com/a/eFfaMhe
All I want to do is add a class “wistia_embed” to the iFrame that the embed is creating using the “Wrapper Attribute” – you can see this attempt in the main video field.
is that not how that works?
The output of what I do is below:
https://imgur.com/a/3kbkZeQ
Howcome the class isn’t there? where is “wistia_embed”?
In order to alter the iframe you need to use the WP https://developer.wordpress.org/reference/hooks/oembed_result/ filter. Basically you need to parse and alter the HTML code for the iframe.
ACF relies on the built in oembed features of WP to output the iframe and there isn’t anything built into ACF to handle it.