How to Remove WP Bakery Page Builder meta generator
For those who were using the popular WordPress page builder “WP Bakery Page Builder” which was previously known as Visual Composer, and need a quick code snippet to remove the meta generator that displays…
<meta name="generator" content="Powered by WPBakery Page Builder - drag and drop page builder for WordPress."/>
on your WordPress header section source code, these are some code snippets that might work for you depending on the version of WP Bakery Page Builder installed. Please use only one of these snippets in your theme’s functions.php. If ones not working, replace with the other one.
Remove VC Generator Option #1 Snippet:
add_action('wp_head', 'myoverride', 1); function myoverride() { if ( class_exists( 'Vc_Manager' ) ) { remove_action('wp_head', array(visual_composer(), 'addMetaData')); } }
Remove VC Generator Option #2 Snippet:
//remove a metatag (Powered by Visual Composer) from the wordpress add_action('init', 'optimize_fixwp_head', 100); function optimize_fixwp_head() { remove_action('wp_head', array(visual_composer(), 'addMetaData')); }
Remove VC Generator Option #3 Snippet:
//remove vc generator add_action('wp_head', 'novcgen', 1); function novcgen() { if ( class_exists( 'Vc_Base' ) ) { remove_action('wp_head', array(visual_composer(), 'addMetaData')); } }
Or you can simply edit the plugin’s core file. Go to your_site/wp-content/plugins/js_composer/include/classes/core/class-vc-base.php (around line 659) and replace the following line:
public function addMetaData() { echo '<meta name="generator" content="Powered by WPBakery Page Builder - drag and drop page builder for WordPress."/>' . "\n";
with
public function addMetaData() { echo '' . "\n";
if you choose to edit the core file, you have to redo the changes again once the plugin updated.
That’s it! To get the latest awesome features WP Bakery Page Builder has to offer, please check here >> WP Bakery Page Builder for WordPress