Skip Navigation

[Resolved] Many templates view output with 1 view search in 1 view

This support ticket is created 2 years, 1 month 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
- 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#2490925

* Tell us what you are trying to do?

For example, I create 2 post type "Resale" and "Rental". In one view search in one view, can I create 2 templates of view output for each post types? In view search, if visitors choose "Resale", the view output show "Sell price" from "Resale" post and its heading, and hide it and show "Rental price" and its heading from "Rental" post and its heading, if they choose "Rental" in view search.

* Is there any documentation that you are following?

* Is there a similar example that we can see?

* What is the link to your site?

#2491765

Hello,

You can display different content templates for each post type.

For example:
1) Create two content templates for each post type.
2) In view's loop, use conditional block to check current post's post type value, and display different content template:
https://toolset.com/course-lesson/using-toolset-conditional-block/
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-type