How to Disable the Active Snippets Admin Bar Menu
Woody Code Snippets displays a Woody menu in the WordPress admin bar at the top of your screen. Its dropdown, headed Active Snippets on This Page, provides quick access to the snippets running on the current page. If you prefer a cleaner admin bar or simply do not need this shortcut, you can disable it using a PHP filter.
In this article
What the Woody Admin Bar Menu Does
The Woody menu appears in the WordPress admin bar for any user who can manage options, whether or not any snippets are currently active. Its dropdown, headed Active Snippets on This Page, lists the snippets running on the current page (showing an empty state when there are none) so you can quickly navigate to them without going through the full Woody snippets menu in the dashboard sidebar.
While this is a useful feature during development or when managing multiple snippets, some users prefer to remove it to keep the admin bar minimal.
How to Disable the Menu
To hide the Active Snippets menu from the admin bar, add the following PHP filter to your site:
add_filter( 'winp_show_admin_bar_menu', '__return_false' );You can add this code using either of the following methods:
Option 1: Add a PHP Snippet in Woody Code Snippets
Navigate to Woody snippets > + Add Snippet in your WordPress dashboard.
Select PHP Snippet as the snippet type.
Paste the following code into the editor:
phpadd_filter( 'winp_show_admin_bar_menu', '__return_false' );Under General Options, make sure the Snippet Scope is set to Run everywhere.
Click Publish to save and activate the snippet.
Option 2: Add the Code to Your Theme's functions.php
Navigate to Appearance > Theme File Editor in your WordPress dashboard.
Select the
functions.phpfile from the file list on the right.Add the following code at the end of the file:
phpadd_filter( 'winp_show_admin_bar_menu', '__return_false' );Click Update File to save.
⚠️ Important: Editing your theme's functions.php directly means your changes will be lost if you update or switch your theme. Using a Woody PHP snippet (Option 1) or a child theme is recommended instead.
Verifying the Change
After adding the filter:
- Refresh any page on your site or dashboard.
- Check the WordPress admin bar at the top of the screen.
- The Woody menu should no longer appear.
To re-enable the menu later, simply deactivate or delete the snippet containing the filter (or remove the code from functions.php).
