How To Remove Visual Composer Generator Tag In WordPress

Visual Composer is a very popular WordPress plugin sold on the Code Canyon marketplace. It is also embedded in a lot of themes to allow users to fully customize their site any way that they would like.

There is a lot of debate and personal opinion on whether to use Visual Composer. I personally find the quite feature useful on a lot of the websites I work on. However, I find it annoying that the plugin adds a generator tag in the header. I appreciate the plugin authors for their hard work, but I do not appreciate plugin and theme authors filling up the header with their own branding material.

The plugin adds the following generator tag to your website. I have included the code to remove the tag below.

<meta name=”generator” content=”Powered by Visual Composer – drag and drop page builder for WordPress.”/>

How to Remove the Visual Composer Generator Tag

This piece of code can be added your website’s functions.php file, a site-specific plugin, or to your child theme. The code also performs a check to see if Visual Composer is actually installed. That way in the event Visual Composer is disabled, your website will not face the white screen of death.

if ( class_exists( 'Vc_Manager' ) ) {
function myoverride() {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}
add_action('init', 'myoverride', 100);
}

After adding the code the Visual Composer Generator Tag should be removed from the front-end of your website.

If you need to remove the WordPress Meta Generator Tag, please consult this tutorial here.

scott hartley

About the author

Scott is a web performance geek, lover of all things coffee, and avid video game player. His WordPress work delves into web performance, web security, and SEO.

1 thought on “How To Remove Visual Composer Generator Tag In WordPress”

Leave a Comment