I want to programmatically restrict access of a given page to members of a given group. I tried this code but it doesn’t work:
Groups_Post_Access::create( array( 'post_id' => $custpage_id, 'group_id' => $cai_group_id ));
where $custpage_id is the id of an existing page and $cai_group_id is the id of an existing group.
Could you please tell me what’s wrong with this code? I didn’t find any documentation on this.
Thanks in advance,