Shortcodes

Shortcodes

rating_form

Display a Rating Form.

AttributeDescriptionDefaultValue
idDefine rating form by ID1Number
post_idGets automatically the post id or add one manuallyautoNumber
comment_idGets automatically the comment id or add one manuallyautoNumber
custom_idDefine a unique ID for multiple rating forms on same post / page
Allowed characters: letters, numbers, dash - or underscore _
EmptyText
term_idDefine term ID of categories or taxonomies0Number
user_idDefine user by ID0Number
titleShow / Hide titles (tooltip text)falseBoolean
scoreShow / Hide average ratingstrueBoolean
totalShow / Hide total ratingstrueBoolean
statsShow / Hide rating staticstrueBoolean
user_statsShow / Hide user stats after rating staticsfalseBoolean
tooltipTurn tooltip into static title if set to falsetrueBoolean
resultDisplay rating result (You cannot rate)falseBoolean
before_contentAdd HTML / Content before a rating formEmptyHTML / Text
after_contentAdd HTML / Content after a rating formEmptyHTML / Text
ratesChange text ratings.
Separate the singular term with a plural term or use one term
rating,ratingsText
txt_scoreChange score format
%1$s =  Average rating of maximum rating
%2$s = Maximum rating
Example: 4.4 out of 5
%1$s/%2$sHTML / Text

Shortcode Example

  • 3.9/5
  • 346 ratings
346 ratingsX
Very bad! Bad Hmmm Oke Good!
9.5% 10.7% 16.2% 9.5% 54%

rating_form_top_rating_results

Display top ratings of different result type (see attribute type).

AttributeDescriptionDefaultValue
form_idGet style and settings from a Rating Form by ID1Number
post_idGet results of a specific post / page ID0Number
before_titleAdd HTML / Content before title HTML / Text
titleChange titleTop 5 RatingsText
after_title Add HTML / Content after title HTML / Text
limitNumber of posts5Number
content_lengthShorten post content length by words10Number
content_activeShow / Hide post contentfalseBoolean
image_sizeSize of the featured image of a post in pixels48Number
image_activeShow / Hide featured imagefalseBoolean
timeSet time of given time field 0Number
time_fieldChoice of fields: hour, day, week, month
Example: [time="1" time_field="day"]
Check post results of 1 day old
EmptyText / Choice
typeOut of which type would you like to see the results?
Choices:
- post_pages
- comments
- taxonomies (for categories, tags etc.)
- users
post_pagesText
post_typeDisplay by selected multiple (custom) post typespost,pageArray
taxonomyFilter by one or more taxonomies and/or terms within these taxomony.
Seperate taxomony by | (vertical bar)
Add terms by using : (colon)
Add relation between terms through hyphen like -AND / -OR
AND: every term in the array must be available
OR (default behaviour): at least one of the term must be availableExample shortcode attribute:
taxomony="computer-AND:hp,lenovo|laptop"
EmptyText
before_contentAdd HTML / Content before top resultsEmptyHTML / Text
after_contentAdd HTML / Content after top resultsEmptyHTML / Text
classAdd custom CSS classEmptyText

Shortcode Example

Top 5 Ratings

rating_form_total

Display total average rating result of multiple rating forms that uses custom_id.

AttributeDescriptionDefaultValue
idGet same style and settings from a Rating Form by ID0Number
post_idGets automatically the post id or add one manuallyautoNumber
comment_idGets automatically the comment id or add one manuallyautoNumber
custom_idDisplay average rating result of a custom_id or multiple custom id's
Example multiple: {rating_form_total custom_id="computer,laptop,mobile"}

Example: {rating_form_total custom_id="laptop"}
custom_id="0" will display results of a Rating Form with attribute id like the following shortcode: {rating_form id="1"}

Change { } to [ ]

EmptyText
term_idGet average total result of a given term ID
term_id are ID's for category, tags and taxonomy
0Number
roundSet decimal of total average rounding1Number
liveLoad total average result through ajax on load
Useful for cache plugins
falseBoolean
typeTwo type of total results.
tud = Thumps Up / Down alike forms
star = Stars alike forms
starText / Choice
type_countDisplay specific average result in percentage or real numbers.
Choice of: count, percentage

Example: {rating_form_total type_count="percentage"}
Change { } to [ ]

countText
textTwo default text
Type 'star' (default): %1$s average based on %2$s ratings
Type 'tud': Up: %1$s Down: %3$s based on %2$s ratings
%1$s = average rating or total Up ratings depends on type
%2$s = total ratings
%3$s = total Down Ratings
See descriptionHTML / Text

Shortcode type 'star' example

You can add content before a rating form.
Also rate below:

Rate below

3.8 average based on 109 ratings

Shortcode type 'tud' example

Would you recommend Rating Form?
  • +65
  • -18
  • 83 ratings
83 ratingsX
Yes No
78.3% 21.7%

Be honest. Do you like it?
  • +50
  • -13
  • 63 ratings
63 ratingsX
Yes No
79.4% 20.6%

Up: 115 Down: 31 based on 146 ratings

rating_form_results

Display rating result for each star.

AttributeDescriptionDefaultValue
idGet settings of a rating form by ID1Number
post_idGets automatically the post id or add one manuallyautoNumber
comment_idGets automatically the comment id or add one manuallyautoNumber
custom_idDefine a unique ID for multiple rating forms on same post / page
Allowed characters: letters, numbers, dash - or underscore _
EmptyText
term_idDefine term ID of categories or taxonomies0Number
classAdd custom CSS classEmptyText
layout_heightChange layout (block) height15pxText
layout_widthChange layout (block) width100pxText
layout_colorChange layout color (grey)#ddddddText
fill_colorChange inner / fill color (yellow)#ffd700Text
type_starsChoice of types: stars, titles
stars = 5 stars
titles = Good!
starsText / Choice
type_countChoice of types: count, percentagecountText / Choice
show_countShow / Hide counttrueBoolean
liveUpdate results after rating or not
To make this happen, select option in settings:
Update rating_form_results after rating
trueBoolean
txt_starsChange text 5 stars, 4 stars etc.
%s = Number of stars
%s starsHTML / Text
txt_countChange text count
%s =  count (540) or percentage (78.5%)
%sHTML / Text

Shortcode Example

5 stars
187
4 stars
33
3 stars
56
2 stars
37
1 stars
33
Vote this page:
  • 3.9/5
  • 346 ratings
346 ratingsX
Very bad! Bad Hmmm Oke Good!
9.5% 10.7% 16.2% 9.5% 54%