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.

How would one go about allowing reader-submitted reviews of different custom-post-types?

For example, if I had a site with a custom-post-type Restaurant and custom-post-type Accommodation. The review structure for each would basically be the same (name, email, comment and rating), and just the star-rating would be styled differently (cutlery vs beds instead of stars). When you view each restaurant, you'd see the reviews for that restaurant, and when you view the restaurant archive, you'd see all the restaurant reviews but not the accommodation reviews, and vice versa for accommodation.

Would customising the comments ability in WP be sufficient for something like this?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Yup, customizing comments should do the trick for you. No need to reinvent the wheel and you can take advantage of many plugins that take the comments functionality a few steps further.

You can use some plugin to add the rating functionality (GD star rating seems to be the most used one) or use comments meta fields to write your own.

When it comes to styling be sure to check the output of body_class() and post_class() functions - you should find a class referencing your post type there.

share|improve this answer
add comment

When i was facing something similar i used custom post type for the reviews and found out that it was a bad bad think because you need to create almost everything your self including the relationship or post to post and ever function that already exists for comments wouldn't be at use so i reverted to using comments in this way:

I create a 4 different comment templates and just call a different one for every post type.

Go with comments!!!

share|improve this answer
add comment

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.