ACF field and embed iframe code inside global block

I’m trying to create a ‘global block: content area modal’ to popup a youtube embed. The URL to the video changes for each post, so I get that info using an ACF field in the post editor.

I’ve tried a few different methods to attempt to get this working, including…

  1. ACF’s own shortcode method: [ACF field=“name”]
  2. x-theme’s integration with ACF: {{acf:field_name}}
  3. creating my own shortcode in php

Inside the modal content area editor:
<iframe width="560" height="315" src="[shortcode]" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

The resulting popup points to a 404 or doesn’t react at all. I’ve also tried using the Video global block, but no success there either.

Hi There,

I’ve checked your two websites but I couldn’t find the content modal at the end of posts.

Could you please provide us with a link so we can take a closer look?

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.