Forums

[resolved] Remove <meta name="generator" content="WordPress 2.5" /> (9 posts)

  1. WoodiE
    Member
    Posted 5 months ago #

    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.

  2. Otto42
    Moderator
    Posted 5 months ago #

    The generator stuff was moved into the core and standardized, since so many themes did it differently that it didn't make much sense anymore.

    You can remove it by adding this to your theme's functions.php:
    remove_action('wp_head', 'wp_generator');

  3. WoodiE
    Member
    Posted 5 months ago #

    Got it - thanks!

  4. ethoslight
    Member
    Posted 4 months ago #

    Woops! I tried what you described Otto42, then removed it after I refreshed my front page and saw it skewed some things in the theme. After I removed it and checked the page again it looked OK, however, when I try to go to the Dashboard (wp-admin) I get this error message:

    Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/bloglocation/wp-content/themes/themename/functions.php:6) in /home/username/public_html/bloglocation/wp-includes/pluggable.php on line 689

    I tried browsing pluggable.php to see if I could find anything, but alas, I am overwhelmed. Any advice?

    Thanks!

  5. ethoslight
    Member
    Posted 4 months ago #

    OK, resolved. Had to disable all plugins, then log out to fix.

  6. creativeworldstudio
    Member
    Posted 4 months ago #

    Thanks Otto... a great and simple fix :)

    @ethoslight - Your error could be caused by spaces " " in your functions.php file. I had this and just removed the space in Otto's code.

  7. designer310310
    Member
    Posted 4 months ago #

    It instantly worked, thanks Otto42!

  8. vavroom
    Member
    Posted 4 months ago #

    Well, I was going to say "it doesn't work", but then, after about 15 minutes of fiddling, and editing functions.php, I realised that I was making changes to my *local* copy, but looking at the live site!!!

    Well, it did work, thank you for a most simple solution.

  9. mercime
    Member
    Posted 4 months ago #

    Thank you Otto42. You're the best!

Reply

You must log in to post.

About this Topic

Tags