Acf by default blocks html tags eg Iframe to show on front end. To show it perfectly follow these steps:
- Add snippet (PHP): Details
add_filter( 'wp_kses_allowed_html', 'acf_add_allowed_iframe_tag', 10, 2 );
function acf_add_allowed_iframe_tag( $tags, $context ) {
if ( $context === 'acf' ) {
$tags['iframe'] = array(
'src' => true,
'height' => true,
'width' => true,
'frameborder' => true,
'allowfullscreen' => true,
);
}
return $tags;
}
- Add a shortcode in elementor and replace the “field-name†value with acf field name
[acf field="field_name"]
Hurrah – Done
