in my website, I have two Custom post Types, named Opleidingen and Opleidingsessies. Both CPT's have the same custom fields and are used in one view.
In that View, I want to have a conditional layout for both CPT's. So I want to seperate a little part of the code, one part for the CPT Opleidingen, one part for the CPT Opleidingsessies.
For example, the view contains a table. In a row where the CPT Opleidingen is listed, I want to place five cells. in a row where the CPT Opleidingsessies is listed, I want to place four cells. Is there a way to check wich CPT it is in the loop? Maybe with [wpv-post-type] = "opleidingen" ?
Hello. Thank you for contacting the Toolset support.
Yes - you can use [wpv-post-type] with [wpv-conditonal] shortcode to check the current post type and build one content template for each post type, one with file cells and one with four cells and display it according to your post type.
I do not know whey you are going for this option, as its easy to build two views with separate post type assigned.