07 Nov 2007

Remove WordPress rsd_link(), wlwmanifest_link(), wp_generator()

rsd_link(), wlwmanifest_link(), wp_generator() (introduced in revision 6195) are bunch of WordPress default filters that clutter the <head></head> section of your theme template file:

<head>
...
<link rel="EditURI" type="application/rsd xml" title="RSD"
href="http://zeo.unic.net.my/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest xml"
href="http://zeo.unic.net.my/wp-includes/wlwmanifest.xml" />
<meta name="generator" content="WordPress/2.4-bleeding" />
...
</head>

Not using it?

Simply remove those lines by adding the following to your theme functions.php:

remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');

if (function_exists('wp_generator')) {
	remove_action('wp_head', 'wp_generator');
}

Update:

remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');

function remove_generator() {
	return '';
}

add_filter('the_generator', 'remove_generator');

Now, that really clears my HEAD.

Comments RSS feed TrackBack URL

8 Comments

  1. Zeo

    Hariadi,

    function remove_generator() {
    	return '';
    }
    
    add_filter('the_generator', 'remove_generator');
    

    Reply

  2. Bro..

    bila dah letak code kat atas tu dan pointing ke http://domain.com/rss/.. still ada lagi

    <!– generator=”WordPress/2.5.1″ –>

    Reply

  3. unfortunately im using wlw. so hehe.

    Reply

  4. [...] Remove WordPress rsd_link(), wlwmanifest_link(), wp_generator() Kukaba a felesleges dolgokkal. Zeo tema headert optimalizal. (tags: zeo wordpress themes tweaks) [...]

    Reply

  5. Zeo

    For rsd_link() you can read about RSD (Really Simple Discovery). Basically it helps blogging client like ecto, WLW to interact nicely with your blog.

    wlwmanifest_link() outputs wlwmanifest.xml which is the resource file needed to enable tagging support for Windows Live Writer.

    wp_generator() outputs your WordPress version in XML or Comment for RSS, ATOM, etc.

    Copy paste, correct me if I’m wrong.

    Reply

  6. what does those functions/filters do?

    Reply

  7. Zeo

    Groll, just create your own functions.php PHP file inside your current theme folder. If not, you just download and activate this WordPress plugin.

    Reply

  8. Groll

    And if I don’t have a functions.php file in my theme, could you tell what must I do please ?

    Reply

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>