Access rules you set up for post types do not apply to posts displayed using a View. Instead, you need to use conditional HTML output or Access shortcodes in the Views Loop Editor directly.

To display posts in a View according to the Access rules you set up for a Post Group, there are three main steps you need to do:

  1. Enable hidden custom field that contains Post Group ID
  2. Get the Post Group ID
  3. Use the conditional output inside a View Loop

Enable hidden custom field that contains Post Group ID

Post Group ID enables unique identification of each Post Group. This field is hidden by default. In order to use it you need to enable it.

What you need to doHow it looks like
Go to the Toolset -> Settings page and click the Front-end Content tab.

In the Hidden custom fields section click the Select custom field button.

Hidden custom fields section
In the Select hidden custom fields to show dialog enable the  _wpcf_access_group field and click the Apply button.Select hidden custom fields to show dialog

Get the Post Group ID

After enabling the _wpcf_access_group field you need to get the exact ID for the Post Group you want to target. For this, you need to use a shortcode to display the Post Group ID on the front-end. After that, you can remove that shortcode.

What you need to doHow it looks like
Edit any single post assigned to your Post Group and click the Fields and Views button.

Go to the Post fields section click _wpcf_access_group.

If you do not see it, click the Load non-Types custom fields button first and then click _wpcf_access_group.

Fields and Views
Visit this View on the front-end and you will see the Post Group ID for your post. In this example, the Post Group is wpcf-custom-group-70a37754eb5a2e7db8cd887aaf11cda7.

Make a note of your Post Group ID and then edit the post again and remove the [wpv-post-field name='_wpcf_access_group'] shortcode from it.

Load non-Types custom fields

 

Use the conditional output inside a View Loop

As the last step you need to go to your View and edit it. Select the part of the Loop that you want to be shown or hidden based on Post Group ID and add a condition to it.

What you need to doHow it looks like
Edit a View that displays your posts.

Click the conditional output button to add HTML conditional to your View Loop.

Conditional output
Add a condition to check the value of hidden custom field _wpcf_access_group against Post Group ID from previous step.

This allows you to show or not show the content depending on the Post Group assigned to the current Post in the loop.

Check the value of hidden custom

The conditional markup added to your View will look something like the following:

Conditional shortcode
[wpv-conditional if="( $(_wpcf_access_group) eq 'wpcf-custom-group-70a37754eb5a2e7db8cd887aaf11cda7' )"]
[wpv-post-title]
[/wpv-conditional]

The example above will display the post title only if the current post in a loop belongs to a Post Group you set in the Insert conditional shortcode dialog.