Remove WordPress Generator Meta Tag Completely

I will explain below how to remove WordPress generator version tag in wp_head.  The following code will remove the WordPress generator  version numbers from your head by adding the function.php file. You can simply get rid of the worpress generator version number problem with the following code. You can easily delete wordpress generator  version number in your website


remove_action( 'wp_head', 'wp_generator');
function completely_remove_wp_version() { return ''; }
add_filter('the_generator', 'completely_remove_wp_version');
add_filter('get_the_generator_html', 'completely_remove_wp_version');
add_filter('get_the_generator_xhtml', 'completely_remove_wp_version');
add_filter('get_the_generator_atom', 'completely_remove_wp_version');
add_filter('get_the_generator_rss2', 'completely_remove_wp_version');
add_filter('get_the_generator_comment', 'completely_remove_wp_version');
add_filter('get_the_generator_export', 'completely_remove_wp_version');
// if you are using woocommerce
add_filter('wf_disable_generator_tags', 'completely_remove_wp_version');

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *