Title: Placing in head vs functions.php
Last modified: August 30, 2016

---

# Placing in head vs functions.php

 *  [danina84](https://wordpress.org/support/users/danina84/)
 * (@danina84)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/)
 * Hi,
    I was wondering if it better(for performance) to put noindex, follow and
   meta descriptions in a child theme’s head.php or the child theme’s functions.
   php. I know when placed in the functions I will not have problems in case of 
   theme updates, but what is better for performance? Thanks.

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

 *  [Jay](https://wordpress.org/support/users/phyrax/)
 * (@phyrax)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/#post-6547607)
 * I, personally, keep as much separated from the theme as I can, this allows me
   as a dev to edit what I need to without having to worry about a designer stepping
   on my toes.
 * Plus, by putting it in functions.php you allow future devs to override it should
   they feel the need to do so.
 * Honestly unless you’re doing a crazy loop of some kind to generate the content
   in the head, you will not see a huge performance change/gain rather than using
   it in functions.php
 *  Thread Starter [danina84](https://wordpress.org/support/users/danina84/)
 * (@danina84)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/#post-6547608)
 * I am mostly thinking about adding meta tags into header vs putting them into 
   a function.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/#post-6547683)
 * Like Jerry said, no noticeable difference in performance. If the meta tags somehow
   had to do with how the site appears visually, i.e. “theme stuff”, then the header
   template would be reasonable. Otherwise make it a function, preferably with a
   hook for others to be able to easily alter how the function works.
 * If it really has nothing at all to do with a theme, I personally would put the
   function in a plugin. All my sites have a site specific plugin for such random
   code so the theme can be easily changed without having to fuss with child themes.
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/#post-6547684)
 * > I personally would put the function in…a site-specific plugin for such random
   > code…
 * Yes, and maybe have a look at ‘Code Snippets’:
 * [https://wordpress.org/plugins/search.php?q=code+snippets](https://wordpress.org/plugins/search.php?q=code+snippets)

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

The topic ‘Placing in head vs functions.php’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 4 participants
 * Last reply from: [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/placing-in-head-vs-functionsphp/#post-6547684)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
