Remove menu items from admin bar (on top)


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function wps_admin_bar() {
  2. global $wp_admin_bar;
  3. $wp_admin_bar->remove_menu('wp-logo');
  4. $wp_admin_bar->remove_menu('about');
  5. $wp_admin_bar->remove_menu('wporg');
  6. $wp_admin_bar->remove_menu('documentation');
  7. $wp_admin_bar->remove_menu('support-forums');
  8. $wp_admin_bar->remove_menu('feedback');
  9. $wp_admin_bar->remove_menu('view-site');
  10. }
  11. add_action( 'wp_before_admin_bar_render', 'wps_admin_bar' );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.