I built a post category view that displays an image from the category featured image field. As I have to build the category content template in code (can't built categories visually) I'm pulling in the image by using a types shortcode. The image is 800px wide, but toolset is pulling the smallest available image (100px) so it looks fuzzy. Do I need to edit the code to pull the full-size image into the content template?
The category view can be seen here:
hidden link
This is the content template code I'm using for the view:
<div style="border-radius:15px;margin:15px auto;padding:0;max-width:370px;"><div style="border-radius:15px 15px 0 0;background: #ffffff url('[types termmeta='category-featured-image' size='full' width='100%' height='auto' url='true'][/types]') no-repeat center top; height: 400px;background-size:cover;"></div>
<div style="border-radius:0 0 15px 15px;background: #ffffff;padding-bottom:10px;margin-bottom:40px;text-align:left;"><h4 style="padding:25px 0 0 25px;font-weight:600;">[wpv-taxonomy-title]</h4>
<div style="margin: 30px 0 20px 20px;" class="tb-button">Read More</div></div></div>
Thanks for your help!
Hello,
I suggest you setup a taxonomy view:
- Query terms of your custom taxonomy
- In view's loop, display the taxonomy image field in full size + other term information
In your PHP codes, you can render above taxonomy view with function render_view(), see our document:
https://toolset.com/documentation/programmer-reference/views-api/#render_view
My issue is resolved now. Thank you!