How to Restrict Admin Panel to Administrators Access Only

Prem Tiwari - - WordPress Snippets

Hi friends, this is a very quick WordPress tutorial which demonstrates how to restrict admin panel to administrators access only.

This is the best idea to keep away your website users from admin area access. This is the very simple function which restricts non-admin users to visit the administrator screens.

Open functions.php file and copy paste below code at the end of the file and save it.

If you like this tutorial, share this with your friends via social media channel and also subscribe our newsletter to get the best tutorials directly in your email inbox.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.