To restrict access to the default WordPress “post” post type using BP Private Community Pro, you can add the following code snippet to your child theme’s functions.php file or use a custom functionality plugin:
/**
* Wbcom Designs - Add the default WordPress 'post' post type to the list of restrictable post types.
*
* @param array $post_types An array of post type objects to be filtered.
* @return array Modified array of post type objects including the 'post' type.
*/
add_filter( 'blpro_restrictable_post_types', function( $post_types ) {
if ( post_type_exists( 'post' ) ) {
$post_types['post'] = get_post_type_object( 'post' );
}
return $post_types;
} );

