How to add Custom WordPress User Roles

Are you want to add new custom user role in your WordPress site? If your answer is yes, then this tutorial is for you. In this tutorial, I am going to share how to add custom WordPress user role with the help of add_role() function.

wp users

How to add Custom WordPress User Roles

Add the below code inside your functions.php or you can also add inside your custom plugin file. In the below code we are going to add a new custom WordPress user role as “Guest Blogger” with the only required access of WordPress admin area.

How to remove the custom role from WordPress

Use the below code to remove any custom or standard user role from your WordPress websites.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected]om. Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


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.