Home › Forums › WTI Like Post PRO › Display current post position › Reply To: Display current post position
October 27, 2015 at 5:51 pm #384
You need to get the post ids of the top 20 most liked posts. You can query our like table to find out the sum of likes of each post group by post id and sorted by the sum of like count. You can refer to most liked posts shortcode. Once you have the list of post ids, you can check for the current post’s id with the array of most liked post ids by using in_array function. If that function returns true, then that specific post is in the top 20.