Skip Navigation

[Resolved] Apply post group to category archive

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

Problem:

Is it possible to restrict access to the post-type archive but not the single post?

Solution:

It is possible to restrict users to access pages using the method below:

https://toolset.com/course-lesson/restricting-access-to-pages/

But please consider that WordPress creates an archive automatically when a custom post type is created and the control for accessing that is connected to the whole post type itself and there is no distinction.

So be aware that even if you restrict the page in question that contains the archive, there is an internal link created by WordPress that will be accessible unless you restrict the access of the whole post type.

Relevant Documentation:

https://toolset.com/course-lesson/restricting-access-to-pages/

This support ticket is created 2 years, 5 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.

This topic contains 4 replies, has 2 voices.

Last updated by Christopher Amirian 2 years, 4 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2409635

Dear Sir/Madam,

I know how to apply the post group to the page, I customize the WordPress Archive using Toolset, and how can I restrict only the specific user role can view the archive page?

I tried to use the filter but there is not user role be selected.

Best regards,

Kelvin.

#2410377

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You do not have any restriction functionality using Toolset filters, instead, you need to use the Toolset Access plugin if you want to restrict content for user roles. For more information:

https://toolset.com/course-lesson/setting-access-control/

But, there is no specific archive page restriction in WordPress, the answer below might help to give more context:

https://toolset.com/forums/topic/access-control-for-archive-templates/#post-1951187

Thanks.

#2410423

My issue is resolved now. Thank you!

#2410617

Dear Christopher Amirian,

What if I want to allow guests to view the individual custom post but not the archive page, if I use access control, it will block the archive page including all posts.

Best regards,

Kelvin

#2410791

Christopher Amirian
Supporter

Languages: English (English )

Hi Kelvin,

It is possible to restrict users to access pages using the method below:

https://toolset.com/course-lesson/restricting-access-to-pages/

But please consider that WordPress creates an archive automatically when a custom post type is created and the control for accessing that is connected to the whole post type itself and there is no distinction.

So be aware that even if you restrict the page in question that contains the archive, there is an internal link created by WordPress that will be accessible unless you restrict the access of the whole post type.

Thank you.