Making a ranking rated by the number of Facebook like. You can make and use a ranking rated by the number of Facebook like width this plugin.
With this plugin, you can create a your posts' ranking sorted by the number of Facebook like.
ExοΌ
Here https://developers.facebook.com/
You can get that here https://developers.facebook.com/tools/explorer/
You can see the setting of this plugin when you install it. Click it.
You will see the setting page like below. Put your token in the form and hit the save button.
All you need to do is just hit the "Create or Recreate" button.
Put the code below whereever you would like to make the raking show up.
<?php if (function_exists('get_like_ranking')) get_like_ranking(); ?>
There are 6 parameters for this method.
get_like_ranking(int $post_number = 5, bool $post_count = true , array $thumbnail = null, $category_id = null, $shorten_words = null, $custom_post_name = null)
Ex)
In this case, There should be 10 articles which are "Movie" custom post type on your raking.
Second argument is false
, thus like count of each artile does not show up.
Thumbnails are 15px x 15px.
If the title og the article is over 25 characters, it's gonne be compressed to 25 characters.
<?php if (function_exists('get_like_ranking')) get_like_ranking(10, false, array(15, 15), null, 25, "movie"); ?>