Title: Manipulating wp_head function
Last modified: August 19, 2016

---

# Manipulating wp_head function

 *  [l2yanuk](https://wordpress.org/support/users/l2yanuk/)
 * (@l2yanuk)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/manipulating-wp_head-function/)
 * Hi everyone,
 * I’m using the all-in-one-seo plugin and what I’m wanting to do is move that to
   the top of the wp_head menu when it renders the html. Currently the wp_head seems
   to display like this:
 *     ```
       <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.example.com/xmlrpc.php?rsd" />
       <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.example.com/wp-includes/wlwmanifest.xml" />
       <script type='text/javascript' src='http://www.example.com/wp-includes/js/jquery/jquery.js?ver=1.2.3'></script>
       <meta name="generator" content="WordPress 2.5.1" />
   
       <!-- all in one seo pack 1.4.6.8 [221,285] -->
       <meta content="index, follow" name="robots" />
       <meta name="description" content="description" />
       <meta name="keywords" content="lots, of, key, words" />
       ```
   
 * but I’m wanting to turn it round so it looks like this instead…
 *     ```
       <!-- all in one seo pack 1.4.6.8 [221,285] -->
       <meta content="index, follow" name="robots" />
       <meta name="description" content="description" />
       <meta name="keywords" content="lots, of, key, words" />
       <!-- end of all in one seo -->
   
       <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.example.com/xmlrpc.php?rsd" />
       <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.example.com/wp-includes/wlwmanifest.xml" />
       <script type='text/javascript' src='http://www.example.com/wp-includes/js/jquery/jquery.js?ver=1.2.3'></script>
       <meta name="generator" content="WordPress 2.5.1" />
       ```
   

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

 *  [d7nh](https://wordpress.org/support/users/d7nh/)
 * (@d7nh)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800136)
 * I can tell you can just forget about it because wp_head will call your plugin’s
   scripts after itself, if you remove wp_head no plugin’s scripts will be called
 * btw the wp_head is in default-filter.php in wp-includes
 *  [rko618](https://wordpress.org/support/users/rko618/)
 * (@rko618)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800173)
 * I would also like to do this. YSlow advises [placing all your stylesheets includes before javascript includes](http://developer.yahoo.com/performance/rules.html#css_top).
   However due to the automatic nature of wp_head I am unable to do anything about
   this.
 *  [hilj](https://wordpress.org/support/users/hilj/)
 * (@hilj)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800174)
 * > btw the wp_head is in default-filter.php in wp-includes
 * Thanks for this! I was bummed by the fact that the `wp_head` spews out the version
   number. I just commented the `wp_genareator` like this: `add_action('wp_head','/*
   wp_generator*/');`
 * But, is there a way to change this without changing the file? Cause after an 
   update I’ll have to change it back.
 * Thanks
 *  [caemusic](https://wordpress.org/support/users/caemusic/)
 * (@caemusic)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800176)
 * yep, there is a plugin to remove the generator meta tag:
 * [http://www.christianschenk.org/blog/removing-wordpress-generator-meta-tag-completely/](http://www.christianschenk.org/blog/removing-wordpress-generator-meta-tag-completely/)
 *  [hilj](https://wordpress.org/support/users/hilj/)
 * (@hilj)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800177)
 * Doing this `('wp_head', '/*wp_generator*/');` wasn’t a good idea after all. It
   worked locally, but on my server it gave an error message. Just to let you know.
 *  [brad_frost](https://wordpress.org/support/users/brad_frost/)
 * (@brad_frost)
 * [17 years ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800181)
 * `remove_action('wp_head', 'wp_generator');`
 * This code worked for me. I placed it inside my theme’s functions.php file. The
   same method works for removing other actions, such as
 * `remove_action('wp_head', 'wlwmanifest_link');`
    `remove_action('wp_head', 'locale_stylesheet');`
   etc

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

The topic ‘Manipulating wp_head function’ is closed to new replies.

## Tags

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

 * 6 replies
 * 6 participants
 * Last reply from: [brad_frost](https://wordpress.org/support/users/brad_frost/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/manipulating-wp_head-function/#post-800181)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
