Generally WordPress is coming with three default types: Comment, Trackback and Pingback. Here I am adding two new custom types: Review & Question and visitors (guest users) can give a review or ask the question via post comment form. At comments listing section users can also filter the comments list with review/question type.
Following functionality is done by this tutorial:
- Adding three custom radio fields: Comment, Review and Question
- When review radio field will select, rating field will show in the comment form. User can submit the rating. This rating functionality is done via free plugin “Comment Rating Field Plugin”.
- Adding the three tab buttons( All Comments, Reviews and Questions) at comment listing section at front end. So you can filter the list.
- Adding the comment type filter at Dashboard -> Comments screen.
- Editing the comment type (when you are editing a comment from your Dashboard).
See the complete instructions at below.
Installing the Comment Rating Field Plugin
Download and Install the Comment Rating Field Plugin at your site. Navigate to Comment Rating Field -> Settings page and change the settings like attached screenshot.
Creating the New JS File
Creating the new JS file comments.init.js and saving into bb-child theme’s js folder. You will create the js (case-sensitive) folder if it is not there. This JS script is toggling the fields of comment form and filtering the comments.