Skip Navigation

[Resolved] Restricted access to single posts, but plublic access to loops of posts

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by toniL 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#596316

Tell us what you are trying to do? I want the users to see the grids of posts of all posts types without the need of registering, but I wan't to restrict access to registered users once they click on one post of the grid to read the full post.

Is there any documentation that you are following? I followed this doc: https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/, but it doesn't explain nothing about the loop and the single template.

Is there a similar example that we can see?

What is the link to your site? hidden link

#596377

If you want to show post links to your guests in a View's Loop, then you must give guests Read Access to the post type. However, if you do that, then they will be able to click those links to visit the single post page. So if you do not want them to see the post content on that single post, you can use Access Control shortcodes in a Content Template to deny the post body and show them a different message instead.

First, create a Content Template for your post type. Insert the Post Body using the Fields and Views button, and confirm the post content shows up as expected on the front-end of your site for logged-in Users. Then edit the Content Template, and use the following code to show the main post content to everyone except Guests, and show a different message to Guests instead:

[toolset_access role="Guest" operator="deny"]
  [wpv-post-body view_template="None"]
[/toolset_access]
[toolset_access role="Guest" operator="deny"]
  Create an account for full access now!
[/toolset_access]

Let me know if I need to explain this in more detail.

#596481

Thanks Chistian! I managed to do it by myself and your answer is confirming I found the right way.
I'm new using Toolset and I'm really need liking it! 🙂

The forum ‘Types Community Support’ is closed to new topics and replies.