How to embed code in ACF?

[ad_1]

I want a field to embed a review script:

<!– Begin widget code –>
<div data-rw-grid=”30917″></div>
<script>var script = document.createElement(“script”);script.type = “module”;script.src = “content here”;document.getElementsByTagName(“head”)\[0\].appendChild(script);</script>
<!– End widget code –>

I can’t find a way to get it to display?

Any thoughts?

[ad_2]
2 Comments
  1. Is that so you can include multiple different scripts on separate pages/posts? This doesn’t really seem like something suited for acf, unless you need multiple scripts. You’re gonna run into an issue with the html being escaped. But you’ll also need to get_field() on the front end to actually pull field content.

 

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