How to pull last 10 posts that have image attachments?
Now sure where to post this but I thought this might be more of a hack as I can’t seem to find it.
What I want to achieve is run a query and show the last 10 posts. This is simple. Now the complex part is I want to pull the last 10 posts that has attachments.
So, in the last 10 posts if only 4 has attachments, I don’t just want to pull 4 posts, I want to select the other latest 6 posts that has attachments. Hope that makes sense.
Is there something like..
It would be great if someone has any suggestions to it.
- The topic ‘How to pull last 10 posts that have image attachments?’ is closed to new replies.