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.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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 ...

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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