{"id":344,"date":"2022-09-21T09:18:36","date_gmt":"2022-09-21T09:18:36","guid":{"rendered":"https:\/\/unmaskwp.com\/?post_type=snippets&p=344"},"modified":"2022-09-21T09:18:40","modified_gmt":"2022-09-21T09:18:40","slug":"remove-comments-link-from-wordpress-admin-bar","status":"publish","type":"snippets","link":"https:\/\/unmaskwp.com\/snippets\/remove-comments-link-from-wordpress-admin-bar\/","title":{"rendered":"How to Remove Comments from WordPress Admin Bar?"},"content":{"rendered":"\n
Are you looking for a way to remove comments from the WordPress admin bar? <\/p>\n\n\n\n
By default, WordPress displays an icon for comments in the WordPress admin bar at the top. <\/p>\n\n\n\n
You can disable the comments from the top admin bar in WordPress using the below code snippet. <\/p>\n\n\n\n
\/**\r\n * Remove Comments from WordPress admin bar\r\n *\/\r\nfunction maverick_remove_comments_from_wordpress_admin_bar(){\r\n global $wp_admin_bar;\r\n $wp_admin_bar->remove_menu('comments');\r\n}\r\nadd_action( 'wp_before_admin_bar_render', 'maverick_remove_comments_from_wordpress_admin_bar' );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"