I have something I want to try, but after some research I’m not sure where to start.
Let’s say I have a post category called Photos, for which each post should display an image in the loop, similar to this:
<div class="category-photos">
<img src="feature-image-here"></img>
</div>
Also, in the same loop, I want to show posts from a category called “Trips”, which should each contain a headline element:
<div class="category-trips">
<h2>The Title of the Post</h2>
</div>
I want these different structures to be presented in chronological order in the same loop, mixed together. However, posts from each category will require a different structure, with images for Photos and headlines for Trips.
Is there a way to do this with Wordpress Actions like The Loop or Show Posts - Smart? If not, is there a way to write a custom loop for my Wordpress theme in Pinegrow? I’m not confident in my ability to do the latter, but maybe I could cobble it together by creating two separate loops, then copying and pasting the code preview into a custom php if statement?
I’m open to any ideas.