Skip Navigation

[Resolved] Using PHP, determine the ID of the Content Template used by the current page

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
- 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Chris 5 years ago.

Assisted by: Shane.

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

Languages: English (English )

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