Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here's what I'm trying to do. I have two custom post types, vendors and products. These are connected, via the Posts2Posts plugin. A vendor post has various meta fields associated with it including some for their address.

What I want to do is to bring up a product and then a) get the connected vendor and THEN b) query for meta values for that vendor.

The reason I want this is that I need to be able to show a visitor all of the products made in a particular state and the state information resides in the vendor CPT, not the product CPT.


share|improve this question

closed as off-topic by Mark Kaplun, birgire, Pieter Goosen, TheDeadMedic, Johannes Pille Sep 14 at 8:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, birgire, Pieter Goosen, TheDeadMedic, Johannes Pille
If this question can be reworded to fit the rules in the help center, please edit the question.

Have tried any code to start with ? –  Simon Nov 23 '13 at 9:09
Could you elaborate what exactly is your challenge here? P2P docs should get you started with (a) and WP docs with (b), neither seems like an excessively challenging task. –  Rarst Nov 23 '13 at 19:53