Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
oxanaox
16,295 PointsWP _query conditional statement with custom post
I would like someone help if it's possible to write conditional statement with multiple WP Queries.
Here is what I want to do.
I have custom posts 1, each post has own parameters like title, picture, description.
I have custom posts 2, each of them has a tag.
I need to display in every custom post 1 as many as exist custom posts 2 which tags are equal to the custom post 1 title.
Is it possible?
1 Answer

Kevin Korte
28,135 PointsSure it's possible. You're going to have to get the tags of custom post 2, and show any that match the title in custom post 1. WP has a lot of functions for working with tags and custom posts.
Spenser Hale
20,914 PointsSpenser Hale
20,914 PointsOxanaox, have you tried writing that statement?