Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Make private posts visible to subscribers. Source:
//* Make private posts visible to subscribers
function customprefix_private_posts_subscribers() {
$subRole = get_role( 'subscriber' );
$subRole->add_cap( 'read_private_posts' );
add_action( 'init', 'customprefix_private_posts_subscribers' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.