Passer la navigation

[Résolu] Hide or restrict access to CPT archives

This support ticket is created Il y a 4 years, 1 month. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par TomW5440 Il y a 4 years, 1 month.

Assisté par: Shane.

Auteur
Publications
#2345173

Tell us what you are trying to do?
How can I hide or restrict access to custom post type archives?
So I have two CPT's Members and Comments. Neither of these require an archive that are visible to users so I'm wondering how I might go about stopping these being accessible? Thank you!

#2345303

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Tom,

Thank you for getting in touch.

You can do this by disabling the archive for both of these post types. To do this you will need to go to Toolset -> Post Types and edit your custom post type.

Search for the has_archive option and ensure that it is not ticked.

Thanks,
Shane

#2345437

My issue is resolved now. Thank you!