OK so I mostly fixed this myself I went into post.php in wp-includes. Changed the
'protected' => true, of pending to
'public' => true, but every time wordpress updates this will reset (I think) so can anybody mention a permanent way to make this change?
Previous part of the question is below
Basically I want my registered users to be able to view private posts types on the front end just like an admin can when they click view post on a draft/pending approval post.
I have this page HERE which loads the pending-approval posts. But when a user clicks one they can't read the post because they don't have the permissions.
I've tried the User Role Editor plugin and gave subscribers the permission for
read_private_pages but that didn't work. (apparently to get it to work they would have also needed edit permissions and I'm not willing to give them permission to edit others posts.)
Are there any solutions I could do in the function.php such as
$subRole = get_role( 'subscriber' ); $subRole->add_cap( 'read_private_pages' ); $subRole->add_cap( 'read_private_posts' );
(tried the above, it doesn't work, was just an example)