Title: Header Code Placement Suggestion
Last modified: January 4, 2024

---

# Header Code Placement Suggestion

 *  Resolved [VannDigital](https://wordpress.org/support/users/vdn-staff/)
 * (@vdn-staff)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/)
 * Is there a way you can add the option for us to place codes in the header of 
   the homepage only as well as the option for us to place codes in the header of
   posts/pages only in a future update???
 * I’d appreciate it if this can be done!!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fheader-code-placement-suggestion%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/#post-17319827)
 * Hi [@vdn-staff](https://wordpress.org/support/users/vdn-staff/),
 * You can limit loading of the code just on the homepage by adding a new snippet
   and creating a simple Conditional Logic rule to only load that snippet on the
   homepage.
 * The same is possible for posts/pages using the Post Type conditions. You can 
   find more info about conditional logic options in this article: [https://wpcode.com/docs/how-to-use-snippets-smart-conditional-logic/](https://wpcode.com/docs/how-to-use-snippets-smart-conditional-logic/)
 * Regarding adding code to the header, using the Site Wide Header location (the
   default for custom snippets) will add it in the same place as the Header & Footer“
   Header” area.
 *  Thread Starter [VannDigital](https://wordpress.org/support/users/vdn-staff/)
 * (@vdn-staff)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/#post-17320901)
 * Got it!!!
 * But unfortunately, since Site Wide Header is the only option I see at the moment
   for adding codes to the header, I see that the codes are still added to the header
   site wide after adding Conditional Logic rules…
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/#post-17323754)
 * Hi [@vdn-staff](https://wordpress.org/support/users/vdn-staff/),
 * I’m not sure what you mean but you should first make sure that all the codes 
   are moved from the Global Header & Footer area to the newly created snippets.
 *  Thread Starter [VannDigital](https://wordpress.org/support/users/vdn-staff/)
 * (@vdn-staff)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/#post-17327798)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/)
 * “**_…you should first make sure that all the codes are moved from the Global 
   Header & Footer area to the newly created snippets._**“
 * I tried that and this…
 * “**_…I see that the codes are still added to the header site wide after adding
   Conditional Logic rules…_**“
 * …was the result, unless there’s something I didn’t do… 🤔

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

The topic ‘Header Code Placement Suggestion’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [VannDigital](https://wordpress.org/support/users/vdn-staff/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/header-code-placement-suggestion/#post-17327798)
 * Status: resolved