WP Manifestindependent plugin directory
manifest / users / groups-non-member-access

Groups non-member access

Give access to post(s), to non-members of specified group(s).

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/geotsiokos/groups-non-member-access/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Give access to post(s), to non-members of specified group(s). When a user is not a member to any of the groups, will have access to the post(s).

For example, we wish to grant access to posts with IDs: 1234, 2, 3345 to all those users that are not members of groups with IDs: 2, 3.

We can specify one or more post ids using the filter hook:

add_filter( 'groups_non_member_access_post_ids', 'example_groups_non_member_access_post_ids');
function example_groups_non_member_access_post_ids( $post_ids ) {
    return array( 1234, 2, 3345 );
}

and one or more group ids using the filter hook:
add_filter( 'groups_non_member_access_group_ids', 'example_groups_non_member_access_group_ids');
function example_groups_non_member_access_group_ids( $group_ids ) {
    return array( 2, 3 );
}