Title: Will it allow embedded inline js code in a WP block?
Last modified: March 6, 2020

---

# Will it allow embedded inline js code in a WP block?

 *  [sbigler](https://wordpress.org/support/users/sbigler/)
 * (@sbigler)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/)
 * Hello,
 * I am looking to embed some html with inline js code into a Guttenburg block. 
   Maybe I have missed it but it is not clear to me that it will work in a block
   and if so, what I would need to do to get it to work.
 * Can someone help clarify this for me?
 * Many, many thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12517411)
 * Yep, it will work in a block just fine. Just type, for example, %CODE1% anywhere
   in a block and it will transformed, upon viewing into the appropriate embed code.
 *  Thread Starter [sbigler](https://wordpress.org/support/users/sbigler/)
 * (@sbigler)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12517517)
 * Hello David and thank you very much for your quick reply.
 * I am still not getting my html with inline js to preview on my WP site.
 * Here is what I did and maybe you can tell me what I am doing wrong:
 * 1. Added a new Custom HTML block on the page.
    2. Pasted embeddable html/javascript
   into this Custom HTML block. 3. Added %CODE1% to this same block, at the top.
 * After publishing and viewing, I only see %CODE1%. (I decided to use the same 
   suffix you had in your example).
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12517520)
 * What do you mean by “Pasted embeddable html/javascript into this Custom HTML 
   block”? You should be adding any embed code into a custom field. You’ll need 
   to make sure it’s named `CODE1` too for the above example to work.
 *  Thread Starter [sbigler](https://wordpress.org/support/users/sbigler/)
 * (@sbigler)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12517593)
 * Okay, I see what you mean.
 * However, it still did not work. It does not look like I can upload a screenshot
   so I will need to describe the latest:
 * 1. I activated custom fields and created one named CODE1, and for the value of
   CODE1 I pasted the custom html/imbedded javascript code. Then saved the custom
   field.
 * 2. Added a HTML block on the page and inside it I pasted {{CODE1}}. (In the plugin
   settings it is set up to use {{ }} as the identifiers)
 * When I update and view the page I don’t see anything.
 * Is there something I am still not doing right?
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12517873)
 * That sounds correct. Can you give me the URL to the page where you’ve tried that?
 *  Thread Starter [sbigler](https://wordpress.org/support/users/sbigler/)
 * (@sbigler)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12518179)
 * Sure thing:
 * [https://calltoservice.org/seminars/](https://calltoservice.org/seminars/)
 * Thank you.
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12518471)
 * That was helpful. So, if I understand this correctly, you’ve embedded some logiforms.
   com JavaScript and, within that, you’re also trying to embed something?
 * That’s what the output on that page looks like. If so, yeah, that isn’t going
   to work – I don’t allow embedding within embeds.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Will it allow embedded inline js code in a WP block?’ is closed to new
replies.

 * ![](https://ps.w.org/simple-embed-code/assets/icon.svg?rev=3073981)
 * [Code Embed](https://wordpress.org/plugins/simple-embed-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-embed-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-embed-code/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-embed-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-embed-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-embed-code/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/will-it-allow-embedded-inline-js-code-in-a-wp-block/#post-12518471)
 * Status: not resolved