Problem:
The user would like to get the ID of the content template of a custom post in code.
Solution:
After the update to Toolset Blocks 1.5, we introduced a new way of handling single post pages with content templates. Now we have conditions and priorities to determine what content template to use on a post to display on its single post page. You will need to pass the post's object ($post) to it:
$template_id = apply_filters( 'wpv_content_template_for_post', 0, $post );
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9:00 – 13:00 |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - | 14:00 – 18:00 |
Supporter timezone: Africa/Casablanca (GMT+01:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 4 months ago.
Assisted by: Jamal.