Forums

Adding a new role in functions.php not working (1 post)

  1. richarduk
    Member
    Posted 1 year ago #

    I'm trying to add a new role. The code I've used is below, and I've given the role a few basic capabilities.

    I've then assigned this role to a user, logged out, and tried to log back in as that user, but get the message that I haven't got the right permissions to be able to log in.

    What am I doing wrong?

    add_role( 'photo_uploader', 'Photo Uploader', array( 'edit_post',
    	'edit_posts',
    	'edit_others_posts',
    	'publish_posts',
    	'read_post',
    	'read_private_posts',
    	'delete_post') );

Topic Closed

This topic has been closed to new replies.

About this Topic