Problem:
Can a Content Template only be assigned to posts and replace their Post Body or can we also use this elsehow?
Solution:
Content Templates, if assigned to a post, will replace the Content of that post.
If you need to display a Content Template independently from the Post Body you'd need to use PHP or other methods to output it in the Themes sections you want which are not the post body.
[wpv-post-body view_template="slug-of-your-content-template"]
is a shortcode, and classically in WordPress you will insert this in a Text Editor of a Post, or else, you can hence display this anywhere you have Text Editors and output that content somehow in the Front End.
You can also insert a Content Template ShortCode in PHP Templates using do_shortcode(), but better would be to use Views API to display that Content Template in PHP:
https://toolset.com/documentation/programmer-reference/views-api/#render_view_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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 4 replies, has 2 voices.
Last updated by martinP-13 4 years, 6 months ago.
Assisted by: Beda.