Web Development & WordPress

ACF Iframe or map not showing when using Elementor Template

From the screenshot you can see, i am showing the google map using shortcode

[acf field="maps"]

Here i am showing how i have done it

  1. At first install CODE SNIPPET wordpress plugins

2. Paste the following code as per the screenshot below ( in the code the word “maps” is same which i used in the shortcode)

add_filter( 'acf/shortcode/allow_unsafe_html', function ( $allowed, $atts ) {
    if ( $atts['field'] === 'maps' ) {
        return true;
    }
    return $allowed;
}, 10, 2 );

3. You are done, here is the screenshot where i used the google map iframe in post ( and that is showing using shortcode in elementor template)

Leave a comment