PHP: Remove WordPress Version String

Old way of removing WP version string, I’m using a more contemporary (and complete) solution. I’ll post it in another entry.


<?php

remove_action('wp_head', 'wp_generator');

// Remove Windows Live Writer link in header
// Do Not do this if you use it
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');

// Remove WP version info
function hide_wp_vers()
{
 return null;
} // end hide_wp_vers function

add_filter('the_generator','hide_wp_vers');

?>

This goes to functions.php in your theme directory. Although, I would use a more recent solution because this one isn’t very complete. As I say, will post the solution I’m using in a new entry.

Leave a Reply

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