How to add a new user new role In WordPress

How to add a new user new role In Wordpress

This code use for you can add new user roles to your website, this code adds your function.php file in WordPress.

<?php 
add_role('other_account', __( 
    'other'), 
    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 
        ) 
 
); 
?>
Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.

Leave a Reply

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

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.