Problem:
Client has a View they want to render directly in a PHP template.
Solution:
Use the API function render_view, passing an array of arguments which should, at least, specify the title or name (slug) of the View, e.g.
echo render_view( array( 'name' => 'view-slug' ) );
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views-api/#render_view
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 8 months ago.
Assisted by: Nigel.