Navigation überspringen

[Gelöst] Como saber si estoy en un custom type concreto

This support ticket is created vor 5 Jahren, 2 Monaten. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 5 Jahren, 2 Monaten.

Assistiert von: Nigel.

Author
Artikel
#1410869

Tell us what you are trying to do?

Estoy intenado condificar un codigo, de comprobacion de seguridad, pero no consigo , encontrar algo que me ayuda sobre ¿como en toolset por php puedo saber en que tipo de custom type estoy?

#1411751

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Hola Rafael

Puedes usar el función is_singular() para comprobar si estás en una entrada tipo particular, ó el función is_post_type_archive() para comprobar si estás en el archivo de un tipo de entrada particular.

https://developer.wordpress.org/reference/functions/is_singular/
https://developer.wordpress.org/reference/functions/is_post_type_archive/