Hi there - I have attached a screenshot below. I am looking to have an archive page that retains the unique styling of each type when collated into one archive style view in order that each type of content is visually differentiated. I was wondering if the [wpv-if evaluate="'[wpv-post-type]' = 'post'"] shortcode holds the answer but I can't seem to get it to work as hoped. Thanks!
Dear jamesG-3,
Your shortocde is correct, i just checked it and everything works fine.
[wpv-if evaluate="'[wpv-post-type]' = 'post'"]
<div class="content-for-posts"></div>
[/wpv-if]
If you still have problem, please copy/paste here your View layout content.
Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.
Regards,
Gen.
Thanks - I will give it a shot and see how it goes
Hi there - I tried the following shortcode and nothing appeared.
[wpv-if evaluate="'[wpv-post-type]' = 'tv'"]
<div class="content-for-posts"></div>
[/wpv-if]
I have a post type called tv, one called shop, one called articles and then the standard wordpress blog posts.
Without the wpv-if I can pull all 4 content types into one long list but I would like to be able to have them styled differently based on the content type. For example, the background of the TV posts should be black with additional padding, the magazine should have a different title font and featured image border etc etc.
I feel like I might just be missing something small here but am not sure what it is. Thanks!
(the site is hidden link)
Dear jamesG-3,
You have to write code for yourself
[wpv-if evaluate="'[wpv-post-type]' = 'tv'"]
<div class="my-class-for-tv">
[/wpv-if]
[wpv-if evaluate="'[wpv-post-type]' = 'shop'"]
<div class="my-class-for-shop">
[/wpv-if]
Post Content
</div>
Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.
Regards,
Gen.
Perfect!!! I think I had some residual code from the posts that threw it out. In cleanly making a new image everything worked perfectly. Thanks