To display HTML or an iframe dynamically using the Dynamic Field widget, follow these steps:
Set Meta Field Type:
Disable Widget Sanitization:
By default, the Dynamic Field widget sanitizes content, which removes HTML tags. To display HTML or iframe code, you need to disable this sanitization.
Add the following code to the
functions.phpfile of your child theme or in the Code Snippets plugin. This code will disable sanitization for the Dynamic Field widget: (Visit this link to access the code)
Add the Dynamic Field Widget:
Test the Output:
The HTML or iframe should now display correctly. This approach also works well for standard HTML content in the Dynamic Field widget.



