I am trying to: determine how to use a conditional statement in the search results archive so that each result shows the name of the custom post type it came from. For example, if a result is from the "Testimonial" post type, I'd like to be able to have the result display "Testimonial" in the search results. Same for my other custom post types as well as regular posts (and even pages if possible).
I visited this URL: hidden link
I expected to see: see description above
Instead, I got: see description above
Hi Josh! Thanks for your question about how to add the post type to your View.
I'm happy to say this is done easily using the wpv-post-type shortcode. More information on this can be found here: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-type
In your Loop Editor, click the Fields and Views button, and select the Post Type option. You can choose how you want it to be displayed - I suggest choosing the second option, Post type singular name.
The following shortcode will be created: [wpv-post-type show='single']. Simply place this in the desired location and style with CSS as needed.
Hope this helps!
Meagan
That is fantastic. It was right in front of me but I somehow missed it! Thanks for the help!