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…
- ACF’s own shortcode method: [ACF field=“name”]
- x-theme’s integration with ACF: {{acf:field_name}}
- 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.