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 am creating a part of my site where a user can enter a comment (review) and rate my web application. When a user enters a comment and rates my site out of 5, their comment will be available to the entire site (after approval).

I am not sure whether to go about this by making a database table for this and manually setting up user input fields into my custom DB table, or trying to use a wordpress plugin, or try and leverage the wordpress comment system in a mixture of both.

Can anyone provide an idea of the best way to go about doing this?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You can use comments and store individual ratings using add_comment_meta().

You would also probably want to store the rating average using add_post_meta(), since it's rather expensive to calculate it on the fly. Each time a rating is added or removed, you will have to update this average.

I don't know if there are any plugins that do this already; haven't searched.

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.