Skip Navigation

[Resolved] Como saber si estoy en un custom type concreto

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

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)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years ago.

Assisted by: Nigel.

Author
Posts
#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

Languages: English (English ) Spanish (Español )

Timezone: 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/