Thumbs Rating

Description

I needed a simple and light plugin to add Thumbs Rating, I couldn’t find any so I built my own.

This plugin allows you to add a thumb up/down rating to your content. You can set it up to show anywhere you want, check out the Installation instructions.

The output is very basic, no images, no fonts, no fancy CSS. Customize the ouput overriding the CSS classes in your style.css file.

Features

  • No output printed by default, check the Installation instructions.
  • Stores the votes values for each content in the current post table (no new database tables are created).
  • Uses HTML5 LocalStorage to prevent the users from voting twice.
  • Easy to customize the output using CSS.
  • Show the most voted (positive/negative) items using shortcodes.
  • Show the buttons using shortcodes.

Languages

  • Arabic: ar (by iFlendra)
  • Catalan: ca
  • Chinese (China): zh_CN (by suifengtec)
  • Czech: cs_CZ (by togur)
  • Danish dk_DK (by BJARNE)
  • Dutch nl_NL (by Thijs)
  • English
  • French: fr_FR (by Arnaud)
  • German: de_DE (by webserviceXXL)
  • Italian: it_IT (by marcochiesi)
  • Japanese: ja (by heySister721)
  • Lithuanian: lt_LT (by Andrius)
  • Persian: fa_IR (by Hamed.T)
  • Portuguese: pt_BR (by Felipe)
  • Polish: pl_PL (by Fafu)
  • Romanian: ro_RO by (by AlexCruz1989)
  • Russian: ru_RU (by anatolt)
  • Serbian: sr_RS (by Andrijana Nikolic)
  • Spanish: es_ES
  • Turkish: tr_TR (by CrimsonIdol)

Give me a hand and translate the plugin in your language, it’s just a few words.

Requests

Feel free to post a request but let’s keep it simple and light.

Ping me / Blame me

Are you using the plugin? Do you like it? Do you hate it? Let me know!

Screenshots

  • This text is shown if you try to vote again.
  • Basic output with the default CSS with the TwentyThirteen theme.

FAQ

I activated the plugin and I don’t see the buttons

You must specify where do you want to show the thumbs within your theme, check out the Installation instructions.

Can I customize the colors?

Absolutely. Check out the CSS within the plugin (thumbs-rating/css/style.css) and override the classes from your theme’s style.css file.

When I sort the admin columns some posts disappear

If the post/page has 0 votes for the column your trying to sort, WordPress hides it.
It only shows the posts/pages with at least +1 or -1 votes.

How do I show the number of votes in other parts of my theme?

Paste the following snippets inside the loop:

<?=function_exists('thumbs_rating_show_up_votes') ? thumbs_rating_show_up_votes() : ''?>

<?=function_exists('thumbs_rating_show_down_votes') ? thumbs_rating_show_down_votes() : ''?>

(Both functions accept the post ID as a parameter in case you need it)

Shortcode

The shortcode [thumbs_rating_top] accept the following parameters:

  • type: positive (default) / negative
  • posts_per_page: 5 (default)
  • category: ID (default = all)
  • show_votes: yes (default) / no
  • post_type: any (default) / post / page / books
  • show_both: no (default) / yes
  • order: DESC (default) / ASC
  • orderby: DESC (default)
  • exclude_posts: “133,2,54,234” (ID of posts separated by commas)

Here’s an example using some parameters:

[thumbs_rating_top type="positive" posts_per_page="10" post_type="post" show_votes="no" order="DESC"]
The shortcode in Widgets or Comments doesn’t work

You might need to allow shortcodes in that sections, here’s how.

Reviews

Read all 47 reviews

Changelog

3.3

  • Add orderby option in shortcode

3.2

  • Add exclude_posts option in shortcode (props @hpd2311)

3.1

  • Author column should not be removed from admin (spotted by sosojni)

3.0

  • Added Arabic translation ar

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code