Ready to get started?Download WordPress


[resolved] Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3 (4 posts)

  1. boutros
    Posted 3 years ago #

    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):
    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.

  2. boutros
    Posted 3 years ago #

    Any help? Anybody having this issue?

  3. boutros
    Posted 3 years ago #

    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.

  4. boutros
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic