This tutorial will teach you how to create new Review Types and then attach them to the Custom Post Types (CPT) using the JetReviews WordPress plugin.
Before you start, check the tutorial requirements:
- Elementor (free version) or Block editor (Gutenberg) installed and activated
- JetReviews plugin installed and activated
- JetEngine plugin installed and activated with a CPT created
- JetThemeCore plugin installed and activated with a single post template created
The JetReviews plugin allows you to create different review types for each of the custom post types you have on your WordPress website. Assessment criteria for rooms you offer for rent and products you sell are different, so review templates also have to differ. Now, let’s look at how you can create a template and assign it to the appropriate (Custom Post Type) CPT.
Add a New Review Type
Go to WordPress Dashboard > JetReviews > Review Types. Click the “Add New” button at the top of the screen.
Things to know
With the latest 3.0.x version, the flow was redesigned. If you upgrade from 2.3.x to the existing Post and User Source settings will be converted into corresponding Review Types.
On the Add New Review Type page, you need to fill in a set of fields:
General Settings tab:
- Name — a field that allows one to set a unique, descriptive name for the review type;
- Slug — a field that allows one to define a URL-friendly identifier for the review type. The slug must contain only letters, numbers, hyphens (-), and underscores (_). This slug is used in URLs and database references. Example: ‘customer-reviews’ or ‘product_ratings’;
- Source — a select field that allows one to choose the primary data source for reviews. Two options are available:
- Post — an option for reviews associated with content items (posts, pages, products);
- User — an option for reviews associated with user profiles or accounts;
- Source Type — a select field that displays a set of source type options. If the ”Post” is selected in the previous field, the following options are available:
- Posts — an option for blog posts or articles;
- Pages — an option for static pages or landing pages;
- Floating Elements — an option for dynamic content blocks or widgets;
- Products — an option for eCommerce products (only available when the WooCommerce plugin is installed).
Advanced Settings tab:
- Review Fields — a field that allows you to create custom rating criteria for the reviews. Click the “Add New Field” button to reveal a repeater field with three configuration options:
- Label — a text field that defines the title of the criteria. The field name is automatically generated based on this label;
- Step — a numeric field that defines the size of rating increments. For example, setting this to “10” with a Max Value of “100” allows users to rate in 10-point increments (10, 20, 30, etc.);
- Max Value — a numeric field that sets the highest possible rating value. Can be any number from 1 to 100 or higher, depending on your rating scale needs;
- Allowed roles — a select field that determines which WordPress user roles can submit reviews. Choose from all available WordPress user roles, including: “Administrator”, “Editor”, “Author”, “Contributor”, “Subscriber”, and any custom roles;
- Review author verification — a select field that controls how review authors are verified before their reviews are published, choose from available use roles;
- Comment author verification — a select field that controls how comment authors are verified before their comments on reviews are published, choose from available use roles;
- New review approval — a toggle (deactivated by default) that requires administrator approval before new reviews are published. When enabled, all submitted reviews will remain pending until manually approved by an admin;
- Allow comments — a toggle (deactivated by default) that turns on or off the ability for users to leave comments on individual reviews for this post type;
- New review comments need approval — a toggle (deactivated by default) that requires administrator approval before new comments on reviews are published. When enabled, all review comments will remain pending until manually approved;
- Allow review rate actions — a toggle (deactivated by default) that enables like/dislike functionality for individual review items on this post type. Users can interact with reviews by rating them as helpful or unhelpful;
- Upload media — a toggle (deactivated by default) that allows users to attach media files (images, videos) to their reviews.
Post Metadata tab:
- Use post metadata — a toggle (deactivated by default) that enables integration with WordPress post metadata to store review data. When enabled, the following configuration fields become available:
- Average rating metadata key — a text field that defines the meta key for storing average post ratings. Default value: “_jet_reviews_average_rating”. This key is used to store and retrieve rating data from the WordPress database;
- Post meta ratio bound — a numeric field that specifies the ratio conversion limit for post metadata calculations. Default value: “5”. This controls how ratings are scaled when stored in post metadata;
- Sync average rating — a button that manually adds or updates jet-rating data to post metadata. Use this to synchronize existing review data with WordPress post metadata;
Structure Data tab:
- Use Structure Data — a toggle (deactivated by default) that enables the rendering of structured data in JSON-LD format for better search engine optimization and rich snippets in search results:
- Type — a select field (appears when the previous toggle is activated) that determines the type of structured data schema to use. Available options include: “Thing”, “Product”, “Place”, “Service”, “Organization”, “Event”, and “Creative Work”.
In this case, for the Source field, I’ll select the “Post” option, and for the Source Type field, I’ll select the “Useless Inventions” CPT option.
When done, click on the “Create Review Type” button.
Edit the CPT Single Template
After defining the settings of the review type, go to the WordPress Dashboard > Crocoblock > Theme Builder to edit the body of the CPT. Click on the “pencil” icon to open the CPT body template in Elementor editor.
When the editor loads, toggle the Add Elements panel (clicking the “+”) and type “reviews listing” in the search, to add a Reviews Listing widget to the page.
In the widget settings, select the “Post” option in the Source field.
When done, click the “Publish” button, and now the reviews block will be added to every item of the “Useless Inventions” CPT.
To approve/unapprove, edit, or delete the reviews, go to WordPress Dashboard > JetReviews > All Reviews.
That’s it. Now you know how to create a new Review Type and assign it to the Custom Post Type on your WordPress website.