Skip Navigation

[Résolu] Apply post group to category archive

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 1 an et 9 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 4 réponses, has 2 voix.

Last updated by Christopher Amirian Il y a 1 an et 9 mois.

Assisted by: Christopher Amirian.

Auteur
Publications
#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: Anglais (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: Anglais (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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.