Support » Plugins » Hacks » Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3

  • Resolved boutros

    (@boutros)


    The code to remove WP version number, that I added a while back to the ‘functions.php’ file (and it was working in prior Versions of WordPress) does not work anymore in WP 3.1.2 and 3.1.3:
    here is the hack (added in functions.php)
    //Remove all WordPress version from header + feed

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

    This one does not work either (added in functions.php):
    //REMOVES ONLY FROM HEADER
    remove_action('wp_head', 'wp_generator');

    Basically the following meta is still visible in the header of the HTML source:
    <meta name="generator" content="WordPress 3.1.3" />

    I even tried the ‘Remove WP version everywhere’ plugin and it did not work either.
    What is the solution here? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Any help? Anybody having this issue?
    Thanks.

    It seems (but I could not find it documented anywhere) starting with Version 3.1, WordPress no longer add the version number by default when wp_head()is fired.
    add_action('wp_head', 'wp_generator'); is not being added by default.

    I was wrong about my previous post. Thanks to the caching screw up of W3 Total cache on IIS servers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3’ is closed to new replies.