Title: Missing Snippet in Code
Last modified: October 6, 2021

---

# Missing Snippet in Code

 *  Resolved [apload](https://wordpress.org/support/users/apload/)
 * (@apload)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/missing-snippet-in-code/)
 * Code Snippet plugin is activated and following code
 *     ```
       add_action( 'wp_head', function () { ?>
   
       <script>console.log("jctest");</script>
   
       <?php } );
       ```
   
 * is also activated, but it doesn’t load. Actually i wanted to load there an external
   script for a cookie consent tool (ccm19), but i reduced it to the code above 
   in order to find a working example.
 * I’m publisher and developer (ASP.Net) and not WordPress user, but this can’t 
   be so difficult. When I changed in WordPress to Customizer then I saw the code,
   which is even more strange for me.
 * Any suggestions?
 * Thanks, Jan
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmissing-snippet-in-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/missing-snippet-in-code/#post-14943164)
 * [@apload](https://wordpress.org/support/users/apload/) – that code snippet is
   working for me. Your theme probably do not have `wp_head();` for `wp_head` action
   hook to work?
 *  Thread Starter [apload](https://wordpress.org/support/users/apload/)
 * (@apload)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/missing-snippet-in-code/#post-14943294)
 * Thanks Sanjeev
 * How can I be sure if the theme Hever has it? Is it possible to add wp_head() 
   myself or will it be overwritten by updating wordpress etc. in future?
 *  [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * (@sanzeeb3)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/missing-snippet-in-code/#post-14943370)
 * Hi [@apload](https://wordpress.org/support/users/apload/) – You can check first
   by switching to the default WordPress theme such as Twenty Twenty One. If you
   don’t see an issue with that theme, you’ll probably need to contact Hever theme
   support.

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

The topic ‘Missing Snippet in Code’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Sanjeev Aryal](https://wordpress.org/support/users/sanzeeb3/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/missing-snippet-in-code/#post-14943370)
 * Status: resolved