Trying to add ability to 'add, edit and delete pages' in Wordpress custom user role.
I am creating a custom user role below, i.e. 'sub admin'. I am trying to grant access to all 'page' abilities; but with even identifying the below, it's not working. (no 'add page, edit current page tabs displaying).
Also maybe to note; I am attempting this from a custom child theme's /function.php file. The role is displaying in the WP dashboard after the below code (i.e. Sub Admin), however I have been unsuccessful allowing there to be access to pages.
add_role(
'sub_admin',
__( 'Sub Admin' ),
array(
'read' => true,
'edit_posts' => true,
'publish_posts' => true,
'edit_pages' => true,
'edit_others_pages' => true,
'publish_page' => true,
'edit_pages'=>true,
'edit_published_pages'=>true,
'publish_pages'=>true,
'delete_pages'=>true,
'delete_others_pages'=>true,
'delete_published_pages'=>true,
)
);