How to add custom role in wordpress?

Picture of Amitpal Singh
Amitpal Singh
November 4, 2020
        add_role( 'test', 'Test Role', array(
		'read' => true, // True allows that capability
		'edit_posts' => true, // Allows user to edit their own posts
		'publish_posts'=>true, //Allows the user to publish, otherwise posts stays in draft mode
		'edit_published_posts'=>true,
		'upload_files'=>true,
		'delete_published_posts'=>true,
	));

Share this post:

How to Attribute?

Lorem ipsum is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero.
for Example: Website, Social Media, Blogs, ebooks , newsletter, etc.
Lorem ipsum is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero.
Copied!

Got a Question? Check out our FAQ Section.

Your action, our appreciation

It encourage us to give you more valuable content on website.