Sort Most Liked Post issue
-
Hi,
First of all, thanks for the great plugin! I have tried a lot of Like plugin out there but nothing can beats WP ULike.
I tried to sort posts according to Likes on my archive page. But when I add this line of code
$wp_query = wp_ulike_get_most_liked_posts( 10, array( 'post' ), 'post', 'all', 'like' );
, it cause an error because the$wp_query
returns an array of WP_Posts instead of WP_Query object. Is there any way that I can return this in form of WP_Query object instead?Also, this function will not return posts with 0 Likes. Can you advice me how to include this too? If it is too much, I appreciate if you can point me to the right direction to achieve this.
Thanks.
- The topic ‘Sort Most Liked Post issue’ is closed to new replies.