0

I have a WordPress site with an iframe that displays custom content from an external site.

Here is my iframe code:

<iframe src="https://www.targetsite.com/UNIQUECODE" width="800" height="800">

I want the "UNIQUECODE" in the iframe to populate based on the browser URL (my site is example.com):

http://www.example.com/iframepage?UNIQUECODE

Is this possible with the WordPress block editor and/or with an update to functions.php?

2
  • Yes of course. How are you generating the iframe mark-up? Just typing the HTML into a block, from PHP in a template, something else?
    – Rup
    Commented Aug 31, 2021 at 0:42
  • Just typing it into a block right now...
    – jvchappy
    Commented Aug 31, 2021 at 3:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.