I would like to pull a list of blog posts based on two blog topics. An example is easier.
Let's say that my blog has these topics: cars, boats, trains, planes, travel, for sale, restoration
I want to be able to pull a set of posts that have two tags, such as:
"cars" and "for sale"
"planes" and "travel"
"boats" and "restoration"
I found code samples to combine two data sets ( blog_recent_posts ), but haven't seen a code sample of comparing two sets of blog posts and only displaying posts that appear in both sets.
One possible solution would be if there is a function comparable to array_intersect_assoc in PHP.
Thank you! I had intended to create a page outside of the blog, but with your code example, I was able to update the blog listing template for a few of the topic pages. Problem solved.