Support » Fixing WordPress » Removing Meta Generator WordPress

  • Hello,

    I wanted to remove from my site:

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

    I saw this thread below:

    I get this after adding to my functions.php file:

    Fatal error: Call to undefined function remove_action() in /pathto/wp-includes/functions.php on line 25

    So my question is 2-fold:

    1) Instead of adding a remove function into functions.php – doesn’t it make more sense to remove the code that generates the generator in the first place?

    2) If this is the best way, does anyone have any idea why I’m getting that fatal error?


Viewing 7 replies - 1 through 7 (of 7 total)
  • You need to be putting the

    remove_action('wp_head', 'wp_generator');

    Into your theme’s function.php, not the core functions.php.

    Good idea to remove it. If you display the “Generated by WordPress version #” in your source code then it’s easier for someone to find your site (like a hacker) who is searching for WP sites of that particular version to exploit.

    Very frustrating, self-aggrandizing, and unnecessarily risky for WP to tuck this generator code where it is harder to remove than it used to be. This ‘feature’ takes away your privacy as an independent website designer to display only-what-you-want. It used to be in the theme’s header.php not in the core code, so you only had to delete it from your theme. Now the ‘generated by WordPress version #’ appears even if your theme doesn’t have it. You have to use the function.php method to hide it. Bummer.

    Probably the worst and most risky feature of WordPress.

    Into your theme’s function.php, not the core functions.php.

    Yup, I’m an idiot. Thanks

    I agree with you Dgold.

    Where is the “best” place to insert the code into the theme’s function.php?

    if you want to be safe, put it right before the closing ?>

    not working on 2.8.4 ?? i’ve tried it.. it’s still shown. 🙁



    Instead of removing the tag completely, any idea how to edit it slightly… For example, instead of showing the usual:

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

    I want to show:

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

    Yes, remove the version info only. Any idea how to do this?


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Removing Meta Generator WordPress’ is closed to new replies.