I've got a custom post type called wine, this will be the main type, I also have a custom post type called review, I want to be able to associate multiple reviews with a wine and have this controlled in the review edit screen.

On the Wine template I need to be able to link to the page listing all the reviews for that wine so the review needs to know the wine's $post->id

Thanks, Mark


I would add a custom taxonomy called "wine" as well. You can use this taxonomy to associate reviews about the same wine and also to associate the "wine" custom post with the taxonomy. Then you can run a query to get all "review" posts that share the "pinot" term in the "wine" taxonomy, for example.

This makes it easier to group posts, custom posts, and pages without needing to know $post->ID for anything.

Justin Tadlock has written a fantastic explanation of custom taxonomies if you need a place to start ...

  • GREAT!!! I was part way there with the taxonomies but my problem was trying to find that $post->ID... THANKS!!!!!!!!!!! – dakine Nov 17 '10 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.