#7249
Vladimir
Keymaster

Hi,

Yes, it’s possible. Just select suitable access model:

$restriction[‘access_model’] = 1; // Prohibit view
and
$restriction[‘access_model’] = 2; // Allow view

$restriction[‘data’][‘posts’] = array( 10, 20, 30 ); // posts/pages/custom post types ID list

Post ID array works for any post type: as WordPress built-in posts and page, as any custom post type.