Can I show a website/iframe in a pop-up dynamically with ACF?

[ad_1]

Hi all,

I have a custom post type where one of the custom fields contains a website link.

I am trying to show this link in a pop-up or lightbox in a iframe.

Is there a way to set the source of this iframe by the value of the custom field? I can’t seem to figure out how to achieve this.

Any advice is much appreciated!

[ad_2]
2 Comments
  1. ACF uses PHP and the get_field function. So you can write your own shortcode, that returns the field, or the full iframe code with the url from the field.

    Or use Bricks or Breakdance or Cwickly, which all enable easy getting of ACF fields (dynamic data) which you could put in a custom code block.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer