Add custom role in wordpress user

Add code to file functions.php

<?php
add_role(
	'agency',
	__('Agency', 'nguyenlap'),
	array(
		'read'            => true, // Allows a user to read
		'create_posts'      => true, // Allows user to create new posts
		'edit_posts'        => true, // Allows user to edit their own posts
		'edit_others_posts' => true, // Allows user to edit others posts too
		'publish_posts' => true, // Allows the user to publish posts
		'manage_categories' => true, // Allows user to manage post categories
	)
);

Leave a Reply

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