Hiding All WordPress notifications from those who don’t need to be bothered with them.

We love WordPress, it’s grown from the blogging platform we started using way back in 2005 into a really powerful content management system which can be extended in all sorts of exciting ways: either with plugins and themes from the great WordPress community, or by creating custom code.

But occasionally you can see its roots showing, and when you use it as a multi-user system with several users all with different editing permissions is one of those situations.

If your website has users who just have the job of editing a single page or post – for example, if your website is a community site like http://www.launcestonbusiness.co.uk/  where each member has their own page to look after – you probably don’t want them all bothered by nag messages about updating plugins such as Woocommerce,  or WordPress core : your site admins will look after all of that and your users don’t want to know about it.

Fortunately, as long as your wordpress website has its own child theme for customisations, you can simply pop this code into your functions.php file,

function hide_update_notices() {
if ( !current_user_can( ‘manage_options’ ) ) {
remove_all_actions ( ‘admin_notices’);
}
}
add_action(‘admin_menu’,’hide_update_notices’);

Hey presto!  admin notices show only to those with the ability to do something about them.

Published
Categorized as Blog

By Victoria

Website builder, Marketer, Google Analytics enthusiast. See more here : About Victoria & Clare Associates