Created
July 12, 2026 18:25
-
-
Save Zodiac1978/133f8900365d972d7bfc35314b486bc6 to your computer and use it in GitHub Desktop.
Removes the adminbar on the frontend - a small plugin for a demo about creating plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Adminbar Remover | |
| * Description: Removes the adminbar on the frontend | |
| * Plugin URI: https://wpmeetup-hamburg.de | |
| * Version: 1.0.0 | |
| * Author: Torsten Landsiedel / WP Meetup Hamburg | |
| * Author URI: https://torstenlandsiedel.de | |
| * License: GPL 2 | |
| * License URI: http://opensource.org/licenses/GPL-2.0 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; // Exit if accessed directly. | |
| } | |
| /** | |
| * Remove adminbar | |
| */ | |
| add_filter( 'show_admin_bar', '__return_false' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment