Title: Accidentally removed the Example JavaScript snippet
Last modified: September 14, 2021

---

# Accidentally removed the Example JavaScript snippet

 *  Resolved [mylesm22](https://wordpress.org/support/users/mylesm22/)
 * (@mylesm22)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/accidentally-removed-the-example-javascript-snippet/)
 * Accidentally removed the Example JavaScript snippet
    Is there a way to re-add
   the “Example JavaScript snippet” to the snippets plug-in?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/accidentally-removed-the-example-javascript-snippet/#post-14884358)
 * Sure. Here it is:
 *     ```
       add_action( 'wp_head', function () { ?>
       <script>
   
       // js code here
   
       </script>
       <?php } );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Accidentally removed the Example JavaScript snippet’ is closed to new
replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/accidentally-removed-the-example-javascript-snippet/#post-14884358)
 * Status: resolved