Skip Navigation

[Résolu] Using PHP, determine the ID of the Content Template used by the current page

This support ticket is created Il y a 5 années. 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 -

Supporter timezone: America/Jamaica (GMT-05:00)

Marqué : 

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

Dernière mise à jour par Chris Il y a 5 années.

Assisté par: Shane.

Auteur
Publications
#1387981

Tell us what you are trying to do?
I would like to be able to determine whether a content template is being used to render the current page, and if so which content template.

Is there any documentation that you are following?
https://toolset.com/forums/topic/question-about-php-functions-in-toolset-api/

#1388209

Shane
Supporter

Les langues: Anglais (English )

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

Hi Chris,

Thank you for getting in touch.

You should be able to get this by accessing the post meta.

get_post_meta( $post_id, "_views_template");

Please try this and let me know.
Thanks,
Shane

#1388615

My issue is resolved now. Thank you!