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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *