Title: Adding code into the head element
Last modified: September 30, 2024

---

# Adding code into the head element

 *  [itbookham](https://wordpress.org/support/users/itbookham/)
 * (@itbookham)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/adding-code-into-the-element/)
 * Hello,
 * I would be grateful if someone could please steer me in the right direction in
   adding code into the <head> element of my website. I need to add Microsoft Clarity
   code.
 * Many thanks.
    -  This topic was modified 1 year, 8 months ago by [itbookham](https://wordpress.org/support/users/itbookham/).
    -  This topic was modified 1 year, 8 months ago by [itbookham](https://wordpress.org/support/users/itbookham/).

Viewing 1 replies (of 1 total)

 *  Moderator [janmtm](https://wordpress.org/support/users/janmtm/)
 * (@janmtm)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/adding-code-into-the-element/#post-18096958)
 * Hi [@itbookham](https://wordpress.org/support/users/itbookham/) !
 * You could create a functions.php file in the root directory of your block theme(
   the same place where style.css and theme.json are located), and load your script
   from there.
 * These guidelines help you with setting that up:
 * [https://developer.wordpress.org/themes/core-concepts/custom-functionality/#loading-scripts-and-styles](https://developer.wordpress.org/themes/core-concepts/custom-functionality/#loading-scripts-and-styles)
 * [https://developer.wordpress.org/themes/core-concepts/custom-functionality/](https://developer.wordpress.org/themes/core-concepts/custom-functionality/)
 * Hope that helps!

Viewing 1 replies (of 1 total)

The topic ‘Adding code into the head element’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentytwentythree/1.6/screenshot.
   png)
 * Twenty Twenty-Three
 * [Support Threads](https://wordpress.org/support/theme/twentytwentythree/)
 * [Active Topics](https://wordpress.org/support/theme/twentytwentythree/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentytwentythree/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentytwentythree/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [janmtm](https://wordpress.org/support/users/janmtm/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/adding-code-into-the-element/#post-18096958)
 * Status: not resolved