Saltar navegación

[Resuelto] Apply post group to category archive

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 3 años. 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.

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Christopher Amirian hace 3 años.

Asistido por: Christopher Amirian.

Autor
Mensajes
#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
Colaborador

Idiomas: Inglés (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
Colaborador

Idiomas: Inglés (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.