Skip Navigation

[Resolved] Displaying a view on a custom PHP template page ?

This support ticket is created 7 years, 2 months 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 7 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#489786

I have a custom WordPress Template which lets say assume its called classifieds.php and I have created a custom view which displays my custom post types and fields. How do I add this view to my custom PHP template ?

Thank you

#489834

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can use View's API to add view to your custom PHP template.

For example:

$args = array(
    'id' => 'YOUR-VIEW-ID',
);
echo render_view( $args );

More info:
=> https://toolset.com/documentation/user-guides/views-api/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.