I am trying to create a view that will display 2 post type side by side.
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-conditional if="( '[wpv-post-type]' eq 'proof-point' )"]
<div style="width:50%; float:left;">
[wpv-post-body view_template="visible-item-proof-points"]
</div>
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-type]' eq 'briefing' )"]
<div style="width:50%; float:right;">
[wpv-post-body view_template="visible-item-briefings"]
</div>
[/wpv-conditional]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-filter-start hide="false"][wpv-pagination class="pagi1"]<center>[wpv-pager-prev-page][wpml-string context="wpv-views"]← Previous [/wpml-string][/wpv-pager-prev-page][wpv-pager-nav-links ul_class="pagination1" reach="2"][wpv-pager-next-page][wpml-string context="wpv-views"]Next →[/wpml-string][/wpv-pager-next-page]</center>[/wpv-pagination]
[wpv-filter-end]
<p style="height:20px;"></p>
[wpv-layout-end]
I want to make the first post type to the left and the other one to the right and show only 5 of each on pagination.
I tried creating on using the loop mentioned above.
Any other workarounds that I can work on to make it function?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Well - the best way to implement such functionality is to create two views, one for your each post type and display it accordingly. I hope this makes sense.
Hi Minesh,
The reason is the filtering. I want to create 1 filter for the 2 post types. I created 2 views and added it to 1 view to make the filter work, unfortunately, not working.
Thanks
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Sorry - what you would like to filter. That way it will not work.
You can not divide the loop into two section. Best way is to make two views and display both view's independently.
More info:
=> https://toolset.com/documentation/user-guides/view-layouts-101/
=> https://toolset.com/documentation/user-guides/displaying-content-using-grids/
Resolved. Not possible with Views.