Tell us what you are trying to do? I have a dropdown sort by Region. When someone chooses a region, I want to show a list of bicycle trails followed by a list of businesses, each with a header. It ends up showing them all weaved together, though, instead of separate lists.
Is there any documentation that you are following? I searched the support tickets and also read this: https://toolset.com/documentation/legacy-features/views-plugin/digging-into-view-outputs/
Is there a similar example that we can see?
What is the link to your site? hidden link
So I did get this to *almost* work. All I need is for each of the custom post type sections to have a heading. The list is sorted by post type, but I'm not sure how to get a label for each post type inserted. Maybe code?
Hello,
How do you setup the post view and view's loop? Can you take a screenshot for it?
In single post, you can display it's post type value with shortcode [wpv-post-type], see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-type
It's possible there's a better way for me to be doing this, but I have the taxonomy results sorted first by post type and then alphabetically. I have it so that if the post type is one thing, it formats a certain way, and if it's the other post type, it formats a different way. But I don't know where to put the post type name so that it only appears once.
Loop:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="loop-item-in-trails-by-region"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
Loop item:
[wpv-conditional if="( $(wpcf-contact-phone-number) ne '' )"][wpv-post-link]
<div class="trail-row">[wpv-post-excerpt]
[wpv-post-featured-image size="large"]
[wpv-post-excerpt output="raw"]</div>[/wpv-conditional]
[wpv-conditional if="( $(wpcf-address-business) ne '' )"]
<div class="business-row"><div class="business-name">[wpv-post-title]</div><div class="business-address">[types field='address-business'][/types]</div><div class="business-phone">[types field='business-phone-number'][/types]</div></div>
[/wpv-conditional]
There isn't such kind of built-in feature, as I mentioned above:
shortcode [wpv-post-type] works in single post.
In your case, you might consider two post views, each post view query only one post type, and filter by the same taxonomy URL parameter, so you can add the section head manually before the post view shortcode, for example:
Post type A:
[wpv-view name="view-1"]
Post type B:
[wpv-view name="view-2"]