Skip Navigation

[Resolved] Displaying a CPT loop but restricting the CPT single page to logged in users

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to restrict some of their pages to users who are not logged in.

Solution:
What you can do is to try using a post group and then deny access to guests for that group. This might make the posts not appear in the view to the guests but you can try.

Take a look at the link below for more information on how Post Groups work in our Access plugin.
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#923506

Tell us what you are trying to do?
I have a custom post type called “Sectors”. These Sectors are displayed in a loop on my Home page. I’d like them to remain visible, but when clicked on, redirected to a registration page, if the user isn’t logged in. Is this possible? I custom build the site with PHP and would like to keep it that way.

Is there a similar example that we can see?
hidden link, but this was done with Layouts/Views ect.

What is the link to your site?
hidden link

#923662

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gabriel,

Thank you for contacting our support forum.

So you want to list out all the posts on a specific page but if the user is logged out and click on that post they are denied access correct?

What you can do is to try using a post group and then deny access to guests for that group. This might make the posts not appear in the view to the guests but you can try.

Take a look at the link below for more information on how Post Groups work in our Access plugin.
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/
Thanks,
Shane