Title: Unable to add script tag HTML code
Last modified: September 20, 2023

---

# Unable to add script tag HTML code

 *  Resolved [Adnan Afzal](https://wordpress.org/support/users/adnanafzal565/)
 * (@adnanafzal565)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unable-to-add-script-tag-html-code/)
 * I am trying to add the following code:
 *     ```wp-block-code
       <script src="dist/open-image-modal.js"></script>
       ```
   
 * But the post is not getting update when I do this.

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

 *  [Peter Kiss (a11n)](https://wordpress.org/support/users/yscik8/)
 * (@yscik8)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unable-to-add-script-tag-html-code/#post-17071089)
 * Hey Adnan!
 * Do you want to display this script tag, or run it on the page? The Syntaxhighlighter
   plugin, like the Code block, is only for displaying code. So when writing the
   post, you have to put the code either in the “SyntaxHighlighter Code” block, 
   or, if you are not using the block editor, between [code] shortcode tags, like
   this:
 *     ```wp-block-code
       [code language="html"]
         <script src="dist/open-image-modal.js"></script>
       [/code]
       ```
   
 *  To run the code instead, take a look at the Code Snippets plugin, or add it 
   to a custom plugin or template code.
 *  Thread Starter [Adnan Afzal](https://wordpress.org/support/users/adnanafzal565/)
 * (@adnanafzal565)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unable-to-add-script-tag-html-code/#post-17071094)
 * [@yscik8](https://wordpress.org/support/users/yscik8/) Okay. Thanks.
 *  Plugin Support [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * (@erania-pinnera)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/unable-to-add-script-tag-html-code/#post-17072083)
 * Hey [@adnanafzal565](https://wordpress.org/support/users/adnanafzal565/),
 * I’m going to mark this thread as solved. If you have any further questions or
   need more help, you’re welcome to open another thread here. Cheers!

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

The topic ‘Unable to add script tag HTML code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/syntaxhighlighter_ffffff.svg)
 * [SyntaxHighlighter Evolved](https://wordpress.org/plugins/syntaxhighlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/syntaxhighlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/syntaxhighlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/syntaxhighlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntaxhighlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntaxhighlighter/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Stef (a11n)](https://wordpress.org/support/users/erania-pinnera/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/unable-to-add-script-tag-html-code/#post-17072083)
 * Status: resolved