WPcustoms WordPress Snippets

Copy the code and paste it in your theme's functions.php file. It can be found in your theme's folder.
You can then run the function by simply typing echo the_functions_name(); wrapped in php brackets.

We take no responsibility that this code is working on your site.
However we do our best to provide tested and optimized snippets.

Deny access for specific admin pages

You do not have sufficient permissions to access this page. – That’s the message you will get if your client\author hits a page which is listed in our $page_slugs variable. The real deal for hiding admin menus. Check out this site for other snippets to hide admin pages so they won’t even appear. Also if the users manually enters the admin page url he will get the permission error message.