Title: wp_head(); Question!!
Last modified: August 19, 2016

---

# wp_head(); Question!!

 *  Resolved [w3dgie](https://wordpress.org/support/users/w3dgie/)
 * (@w3dgie)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/)
 * Okay, so under appearance, editor, in header.php there is a portion that says
   <?php wp_head(); ?>.
 * I am trying to go through the code on all my pages and uniquely organize my code
   so it appears pretty. For example, I want to keep all of the meta tags together
   and all of the link tags together all the style tags together and all the script
   tags together.
 * How would I go about controlling the order these tags are displayed in the header
   from my plugin files?

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

 *  Thread Starter [w3dgie](https://wordpress.org/support/users/w3dgie/)
 * (@w3dgie)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223575)
 * bump
 * [stop bumping – against forum rules – 2 deleted]
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223738)
 * Get ride of `<?php wp_head(); ?>` and then manually enter all your metadata, 
   plugin calls, javascripts, etc., in all your template files. And realize that
   you’re going to break lots of stuff until you get it all correct.
 *  [nickaster](https://wordpress.org/support/users/nickaster/)
 * (@nickaster)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223781)
 * I’m in the same boat…
 * Are you saying that if a theme designer used “<?php wp_head(); ?>” then the specifications
   for that are somewhere in functions.php?
 * I can’t find anything in functions.php that looks like metadata or header code.
   Is there any speed advantage to not using “<?php wp_head(); ?>”?
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223782)
 * > Are you saying that if a theme designer used “<?php wp_head(); ?>” then the
   > specifications for that are somewhere in functions.php?
 * wp_head is a hook.
 * if you want to see just what core stuff depends on it, look inside wp-includes/
   default-filters.php
 * add_action(‘wp_head’, ‘wp_enqueue_scripts’, 1);
    add_action(‘wp_head’, ‘feed_links_extra’,
   3); add_action(‘wp_head’, ‘rsd_link’); add_action(‘wp_head’, ‘wlwmanifest_link’);
   add_action(‘wp_head’, ‘index_rel_link’); add_action(‘wp_head’, ‘parent_post_rel_link’,
   10, 0); add_action(‘wp_head’, ‘start_post_rel_link’, 10, 0); add_action(‘wp_head’,‘
   adjacent_posts_rel_link’, 10, 0); add_action(‘wp_head’, ‘locale_stylesheet’);
   add_action(‘wp_head’, ‘noindex’, 1); add_action(‘wp_head’, ‘wp_print_styles’,
   8); add_action(‘wp_head’, ‘wp_print_head_scripts’, 9); add_action(‘wp_head’, ‘
   wp_generator’);
 * additionally, plugins use it.
 * you can create your own similar hook and move stuff around.
 * Thats what Ive done..
 *  [nickaster](https://wordpress.org/support/users/nickaster/)
 * (@nickaster)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223785)
 * Sorry, what is a “hook” ? Where can I learn about this stuff? Isn’t there just
   a default explanation for the HTML that that variable spits out when it’s called?
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223786)
 * got google?
 * [http://www.google.com/#hl=en&source=hp&q=wordpress+hooks&aq=0p&aqi=g-p3g7&oq=wordpress&fp=fceeb2705a2dd16](http://www.google.com/#hl=en&source=hp&q=wordpress+hooks&aq=0p&aqi=g-p3g7&oq=wordpress&fp=fceeb2705a2dd16)
 * >  Isn’t there just a default explanation for the HTML that that variable spits
   > out when it’s called?
 * No, because its not always the same. read back where I said plugins use it.
 * Do you use the same plugins as me? I doubt it.
 * Its done the way it is because its actually simpler that way.
 * Any of the above can be removed from wp_head by commenting out the corresponding
   line, with no effect on the others. And if you want to know what they all do,
   go get a copy of wingrep, download the zip, unpack it, and search for those strings.
 *  [rmadur](https://wordpress.org/support/users/rmadur/)
 * (@rmadur)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223865)
 * In version 2.9.2
 *     ```
       // Actions
       add_action('wp_head','wp_enqueue_scripts',1);
       add_action('wp_head','feed_links_extra',3);
       add_action('wp_head','rsd_link');
       add_action('wp_head','wlwmanifest_link');
       add_action('wp_head','index_rel_link');
       add_action('wp_head','parent_post_rel_link',10, 0 );
       add_action('wp_head','start_post_rel_link',10, 0 );
       add_action('wp_head','adjacent_posts_rel_link', 10, 0 );
       add_action('wp_head','locale_stylesheet');
       add_action('wp_head','noindex',1);
       add_action('wp_head','wp_print_styles',8);
       add_action('wp_head','wp_print_head_scripts',9);
       add_action('wp_head','wp_generator');
       add_action('wp_head','rel_canonical');
       ```
   
 * And to exclude them (I left the real useful ones):
 *     ```
       remove_action('wp_head','wp_enqueue_scripts');
       remove_action('wp_head','feed_links_extra');
       remove_action('wp_head','rsd_link');
       remove_action('wp_head','wlwmanifest_link');
       remove_action('wp_head','index_rel_link');
       remove_action('wp_head','parent_post_rel_link');
       //remove_action('wp_head','start_post_rel_link');
       remove_action('wp_head','adjacent_posts_rel_link');
       //remove_action('wp_head','locale_stylesheet');
       remove_action('wp_head','noindex');
       //remove_action('wp_head','wp_print_styles');
       //remove_action('wp_head','wp_print_head_scripts');
       remove_action('wp_head','wp_generator');
       remove_action('wp_head','rel_canonical');
       ```
   

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

The topic ‘wp_head(); Question!!’ is closed to new replies.

## Tags

 * [appearance](https://wordpress.org/support/topic-tag/appearance/)
 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [wp_head](https://wordpress.org/support/topic-tag/wp_head/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 5 participants
 * Last reply from: [rmadur](https://wordpress.org/support/users/rmadur/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/wp_head-question/#post-1223865)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
