Absoblogginlutely! » Page 'Removing WordPress version number from themes.'

Removing WordPress version number from themes.

Thanks to Digging into WordPress (a blog I’ve just started reading), it’s possible to easily remove the WordPress version from the header information on a WordPress site. This (slightly) helps security in that the version of wordpress is no longer transmitted to the web browser. It would be nice if this was a toggle switch in WordPress’s admin panel though.
To implement the change, just edit the functions.php file in the Theme and add the following line.
remove_action ('wp_head', 'wp_generator');
One thing to watch is that if you upgrade your theme this change is likely to be undone. I’ve actually created a draft post in WP where I keep my theme changes listed so that they appear in the dashboard and I have a record of what changes are made to the design.
On another theme related post, I have now enabled comments on all the posts on the blog as I had issues where posts that had the enable discussion enabled were not allowing comments to be made on them. Hopefully akismet will continue to do a good job of trapping the spam. I didn’t get any help from the WordPress Support forums so this was my workaround.

Like this post? Spread the word!
delicious digg google
stumbleupon technorati Yahoo!

One comment to “Removing WordPress version number from themes.”

  1. There is also a plugin that does removes the version number, so you don’t have to remember to edit your theme when you change or upgrade it.

    You can find the plugin here: http://just-thinkin.net/2008/04/wordpress-25-plugin-keeps-the-version-out-of-source/.

Leave a comment

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

Top of page / Subscribe to new Entries (RSS)