• Resolved WoodiE

    (@woodie)


    Just upgraded to WordPress 2.5, after doing so the following was added to my source code:

    <meta name=”generator” content=”WordPress 2.5″ />

    This is no where in my theme as I’ve removed it in the past, however this doesn’t seem to be in the themes anymore. How can I remove or edit this line of code?

    At the very least I want to remove the version number.

Viewing 5 replies - 16 through 20 (of 20 total)
  • I will verify this works with 2.7 as well! I had the same error as ethoslight but found out it was because of extra spaces after the ?> in my php. Deleting the extra space fixed my problem! Thanks for this thread!

    Okay I am using WordPress 2.7 along with Deepstack theme and I tried adding the following codes to my theme’s functions.php:

    remove_action('wp_head', 'wp_generator');

    and I also tried:

    <?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 '';
    } // end hide_wp_vers function
    
    add_filter('the_generator','hide_wp_vers');
    ?>

    But both didn’t do anything, I still get the following line when I look at the source of my page:

    <meta name="generator" content="WordPress 2.7" />

    Can someone please help me out? It should be hidden with the previous mentioned code parts, right? :S

    Can’t I just change the header.php (from the theme)?

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

    If I would change that, that wouldn’t result in nasty problems right?

    Fixed it as described above.

    Found this…

    function rm_generator_filter() { return ''; }
    
    if (function_exists('add_filter')) {
      $types = array('html', 'xhtml', 'atom', 'rss2', /*'rdf',*/ 'comment', 'export');
    
      foreach ($types as $type)
        add_filter('get_the_generator_'.$type, 'rm_generator_filter');
    }

    More @ https://www.christianschenk.org/blog/removing-wordpress-generator-meta-tag-completely/comment-page-1/#comment-4917

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Remove <meta name=”generator” content=”WordPress 2.5″ />’ is closed to new replies.