• LJagermaster

    (@the-living-legend)


    I’ve installed this plugin and activated it, but the following line is still generated throughout my whole site:

    <meta name=”generator” content=”WordPress 3.0.1″ /> <!– leave this for stats –>

    I’m using the latest version (of the plugin). There don’t appear to be any back-end options. Is there anything else I need to do to make this plugin work?

    Thanks in advance,

    Lee C

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have a look in your theme’s header.php, this plugin only removes automated generator tags.

    Thread Starter LJagermaster

    (@the-living-legend)

    Thanks for the tip. It had been hard-coded in the theme header.php, just removed it. However, last night I had to deactivate all plugins as a random 500 error occurred overnight, it’s fixed now but I’m unable to reactivate this plugin. When I try to I receive this error message:

    Fatal error: Cannot redeclare cr_remove_generator_footer_code() (previously declared in /**path removed**/auto-copyright/autocopyright.php:185) in /**path removed**/remove-generator-tag-for-wordpress/wp-remove-generator-meta.php on line 49

    Script execution halted: Cannot redeclare cr_remove_generator_footer_code() (previously declared in /**path removed**/auto-copyright/autocopyright.php:185) — 64

    Could be wrong but seems to be a random incompatibility with the Auto Copyright plugin. Bizarre thing is both had been running simultaneously for months with no issues (ftr I narrowed last night’s 500 error down to the Platinum SEO plugin, it’s been resolved so there’s no question this issue is separate from last nights).

    Any ideas?

    Thanks again,

    Lee C

    No idea why this plugin would be conflicting, there’s really very little to it. For reference, all you actually need from it is:
    remove_action('wp_head', 'wp_generator');

    You can put that in your theme’s functions.php and it would work equally as well really.

    Thread Starter LJagermaster

    (@the-living-legend)

    Think I fixed it. The error claims “cr_remove_generator_footer_code()” is the cause of it, so I had a look at the code for both plugins and at the bottom they both contain an identical piece of code (with the only difference being the name of the plugin):

    add_action('wp_footer', 'cr_remove_generator_footer_code');
    
    function cr_remove_generator_footer_code() {
    	echo "<!--  WP Remove Generator Meta Tag by Christopher Ross  - https://thisismyurl.com  -->";
    }

    Am I right in thinking this code is intended to remove – in this example – “WP Remove Generator Meta Tag by Christopher Ross – https://thisismyurl.com&#8221; from the footer of the site? Would it not make more sense to just not include it at all? I removed the above block of code, saved the file then managed to successfully activate the plugin.

    This issue also implies that trying to activate any future plugins containing this block of code (substituting plugin/author details) would also be unusable, so just to be safe I’ve taken your advice and placed the “remove_action(‘wp_head’, ‘wp_generator’);” variable in the functions.php file of the theme and it works perfectly.

    Anyway, thanks for your input Adam ?? And I guess this is now resolved, so if anyone else experiences this issue, either remove the block of code in this post or simply add the

    remove_action('wp_head', 'wp_generator');

    to your themes functions.php file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Remove Generator Meta Tag] Generator info is still generated on all pages…’ is closed to new replies.