Skip to content

Instantly share code, notes, and snippets.

@Tabrisrp
Last active January 2, 2022 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tabrisrp/839d9aab429e4e09bdba369d73837399 to your computer and use it in GitHub Desktop.
Save Tabrisrp/839d9aab429e4e09bdba369d73837399 to your computer and use it in GitHub Desktop.
Remove WP Rocket Admin Bar Menu
add_action( 'wp_rocket_loaded', function() {
remove_action( 'admin_bar_menu', 'rocket_admin_bar', PHP_INT_MAX );
} );
@Edwynn
Copy link

Edwynn commented Mar 8, 2019

I add this code in functions.php file and not working for me. How can I add this code for remove wp rocket admin bar menu?

@christophwessels
Copy link

@Axel186
Copy link

Axel186 commented Jan 2, 2022

Another option:

add_action( 'admin_bar_menu', function($wp_admin_bar) {
	$wp_admin_bar->remove_node('wp-rocket');
}, PHP_INT_MAX );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment