Welcome to documentation for CBX Multi criteria Rating for WordPress. Here will show the basic and advance usages of this plugin

Quick Navigation

  1. Core plugin installation
  2. Install addons
  3. Configure- Create Basic Form
  4. Configure- Create Criterias
  5. Configure- Create Questions
  6. Configure- Make default form
  7. Shortcodes
  8. Widgets
  9. Manual Integration(For advanced user/programmers)
  10. Showing posts by avg rating using wordpress custom query(meta query)
  11. Google rich snippet

Core plugin installation

This plugin’s core version is free and can be install from
wordpress plugin directory

Plugins can be installed in different ways in wordpress. As WordPress codex has very well
documentation about this, we are recommending to read that

Install addons

Pro addons need to install manually. The way we provide the download zip either you will get all plugins in single zip file having name _all.zip at end or individual zip of each plugin. For the first way if all plugins are in one single folder cbratingsystem_all.zip then unzip it and you will find the core and addons. Now either zip individual plugin and upload from wordpress plugin upload manager or directly upload via ftp. Whatever the way you upload after install if you check via ftp to your wordpress plugin dir then it should look like this

Configure- Create Basic Form

If the core or addon plugins are created properly then in plugin listing page it will be shown as below and we are good to move forward to create rating form.

Multiple rating form can be created from the form manager and for each rating form the ratings and average are calculated separately. That means each rating form’s configuration is different and information related to any specific form is stored that way. See this below image about how to access different menus of the rating form

To create or edit a new form from admin panel go from left menu “Rating & Review” -> Add New Form





If you finishes the previous screenshots then a form’s basic information is updated, now it’s time to create criterias

Configure- Create Criterias

Click the criteria tab and you will see the default ones or previously saved one. In pro version you can create unlimited criteria set and criterias in each criteria sets

All text and input fields in criteria view is “click and edit”

Check below screenshot how the criteria should show in frontend

Configure- Create Questions

By default the rating form has a comment field (though it can be enable/disable), additionally custom question can be added and answers from frontend are logged with the form.

In free version only one question can be created, unlimited in pro version as well

Three types of question can be created text input, radio or checkbox. For radio or checkbox if need multiple option maximum 5 fields can be added


Configure- Make default form

If you have one form then it will be default form by default. But from the form listing view you can make any form default, If you don’t mention form id in different usages then default form should be used.

Shortcodes

Rating form has three ways to integrate , auto integration after or before post content or manually code integration or shortcode.
We will explain how to use shortcode for form integration and other shortcodes and their parameters.

Available shortcodes

  1. Show rating form [cbratingsystem]
  2. Show average value [cbratingavg]
  3. Show Top Rated posts [cbratingtopratedposts]
  4. Show Top Rated User [cbratingtoprateduser]
  5. Show Latest Reviews [cbratingreview]

Show rating form using shortcode: [cbratingsystem]

Example usages: [cbratingsystem form_id=”4″]

Possible params

param namedefault valuepossible valuesnote
form_iddefault form idany valid form idtry to use valid form id to be more specific
post_iddefault post id is taken from wordpress loopany post id for which you want to show ratingAs you can use any post id , means you can show rating form for one post in another post !
theme_keyas set default from plugin setting or ‘basic’basic, blueish, greenish, customif you use custom then you have to the required color from form’s theme setting
showreview11,0show/hide review list with rating form

Show average rating for one or multiple posts shortcode: [cbratingavg]

Example usages: [cbratingavg post_ids=”123, 445″ form_id=”4″]

Possible params

param namedefault valuepossible valuesnote
post_idspost id from wordpress loopany valid post id with commatry to use valid post id to be more specific
form_iddefault form idany valid form idDouble check post ids and form id to avoid unexpected results
show_title01, 0shows post title yes/no
show_form_id01,0show/hide review list with rating form
show_text01,0show/hide textual presentation of rating values
show_star11,0show/hide star presentation of rating values
show_single01,0show only for single post or first post
text_labelRating:Any text you wantchange parameter and see how it looks

Top Rated Users: [cbratingtoprateduser]

Example usages: [cbratingtoprateduser form_id=”form id here”]

Possible params

param namedefault valuepossible valuesnote
form_idany valid form idDouble check form id, if no form id given then shows nothing
user_idany valid user id, comma separateIf need to shows for specific users, skip if no need for specific user ids
day00 = all time, 1 = 1 day, 7 = 7 daysshow top rated users for rating of certains days
limit10any valid number
orderDESCASC, DESCAsscending or descending order
post_idcomma separated post idany valid post id with commaif need to show for some specific posts, skip if need for all posts with same form id, try to use valid post id to be more specific
post_typeany post type , example – post, page, product etc
post_filterpost_id, post_typeno filter, or filter by post_id or post_type, if you use post_type or post_id then you need to use post_filter to make it specific
firstorderpost_countpost_count, ratingshow data order by post_count of any single user or avg rating of any user’s post

Top Rated Posts: [cbratingtopratedposts]

Example usages: [cbratingtopratedposts post_type=”post”]

Possible params

param namedefault valuepossible valuesnote
form_idany valid form idDouble check form id, if no form id given then shows nothing
day00 = all time, 1 = 1 day, 7 = 7 daysshow top rated users for rating of certains days
limit10any valid digit
orderDESCASC, DESCAsscending or descending order
post_typeany post type , example – post, page, product etc

Show Latest Reviews: [cbratingreview ]

Example usages: [cbratingreview show_criteria=”1″]

Possible params

param namedefault valuepossible valuesnote
form_idrequiredany valid form idDouble check form id, if no form id given then shows nothing, for multiple use comma
post_idany valid post idDouble check post id, use post_id when you need reviews for any specific post, for multiple use comma
user_idany valid user idDouble check user id, use user_id when you need reviews from any specific user, for multiple use comma
post_typerequiredany valid post type, exmaple post, page etcDouble check post_type, use post_type when you need reviews for any specific post type, for multiple use comma
limit10any valid digit
orderDESCASC, DESCAsscending or descending order
order_bycreatedcreated, post_id, post_title, post_type, user_id, avg, id
show_comment11 or 01 = yes, 0 = no
show_criteria01 or 01 = yes, 0 = no
show_post11 or 01 = yes, 0 = no

Note: This shortcode doesn’t show custom question in review listing if even pro addon is enabled.

Widges

There Three widgets available

Go to widgets manager and add the following widget in your target sidebar

  • Top Rated Posts (Does almost same thing as the shortcode [cbratingtopratedposts])
  • Top Rated Users(Does almost same thing as the shortcode [cbratingtoprateduser] )

Manual Integrations(For developers)

In this section we will try to write how to add the rating form, shows top rated posts, top rated users or avg rating for any post for any form using direct php code in your theme

Add rating form directly in theme

Check this gist or check below

Show avg rating directly in theme

Check this gist or see below:

Showing reviews for any form id and post id

Check this gist or see below:

Showing top rated posts or user

To show top rated users or top rated post directly in theme or in 3rd party plugin try to check the code pattern used in file class.CBRatingSystemWidget.php

Showing top rated posts using wordpress custom meta query

As this plugin has multiple forms and a single post can be integrated with multiple form, it means avg rating for a post will be different for different form id

To make developers life easy we always keep a meta data in post (custom meta field)

Meta field name is ‘cbrating{form_id}’ -> replace the {form_id} with any dynamic form, exmaple cbrating1, cbrating2 and it’s value is avg rating for that form id

Check this gist or see below:

Google rich snippet

This plugins adds the proper syntax for adding google rich snippet for aggregated reviews and regular review listing but the theme must have the rich snippet support.

Example