The easiest would be to use a Plugin that does exactly that:
allow users to review your content - there are some good choices:
hidden link
However, this can as well be created with Toolset, there are a lot of solutions shared in the Forums:
https://toolset.com/forums/topic/star-rating-in-front-end-cred-form/
https://toolset.com/forums/topic/star-rating-for-reviews/#post-331847
https://toolset.com/forums/topic/how-to-get-rating-average-from-cred-for-review/
The logic is this:
- you create a new Post Type "Review"
- This post type is set as a child to the posts to be reviewed
- Create a Toolset Form, which creates new Review Posts
- Include whatever you need in the Form, such as text editors or a Radio Field with options, styled as star Fields.
- Include this form in a Content Template, which you assign to the Posts to be reviewed.
Now you will be able to submit a review for each post on the Front-end.
To make sure this review is bound to the correct currently reviewed post, head to the Toolset form and find the ShortCode that begins with:
[cred_field field='_wpcf_belongs_....
Edit it's "value" attribute, and pass [wpv-post-id].
Example:
[cred_field field='_wpcf_belongs_toolset-parent_id' value='[wpv-post-id]' select_text='--- not set ---' class='form-control' output='bootstrap']
This ensures that the new review will be a child to the currently reviewed post.
You can hide this field with HTML if you do not want the user to see it, or remove it all together and update the Review with Custom PHP later.
To display these reviews, you would create a View that queries Reviews, which belong to the Post where the View is inserted.
This can be set in the Query Filter of the View you would create.
In that View loop, you can display the reviews made and then insert the View as well in the Content Template you apply to the Posts to be reviewed.