Skip Navigation

[Closed] Views PHP Check current page is using specific content template

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.

This topic contains 1 reply, has 2 voices.

Last updated by Shane 5 years, 5 months ago.

Assigned support staff: Shane.

Author
Posts
#295559

Hi,

How can I do the following with php? I have a content template, in my main page template I want to check if the current page is using that content template and do some different things if it is.

How can this be achieved?

Thanks

#295723

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nathan,

We have a hook here that should be able to assist you with finding if the current page is using a content template.

Please see the document here https://toolset.com/documentation/user-guides/views-filters/wpv_filter_force_template/

Please let me know if this was able to assist you.
Thank

The topic ‘[Closed] Views PHP Check current page is using specific content template’ is closed to new replies.