Skip Navigation

[Resolved] Restrict Access to archive of custom post type – only allow admin access

This support ticket is created 4 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.

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.

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)

Author
Posts
#1393835

No user (except admin) should have access to the main leads directory
hidden link (CPT directory)

#1393851

Toolset Access doesn't specifically provide post type archive restrictions. If only admins are allowed to see the full list, it might be simplest to show no archives on the front-end, and let admins see the list in wp-admin. That can be achieved in Toolset > Post Types. Edit the Lead Message post type and disable the Option "has_archive" to turn off the archive for this custom post type.

If front-end display for admins is a requirement, then you could turn off has_archive as described above, and create a custom Page with the same slug lead-message. Insert a View of Lead Messages to display for admins. Then add an Access Group to the Page and set the Access Group settings in Access Control to restrict from all Users except Admins:
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

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