Alimir / wp-ulike

WP ULike enables you to add Ajax Like button into your WordPress and allowing your visitors to like and unlike posts,comments, BuddyPress activities & bbPress Topics
http://alimir.github.io/wp-ulike/
102 stars 27 forks source link

wp_ulike_get_most_liked_posts() return only 5 posts #78

Closed Acheyy closed 4 years ago

Acheyy commented 4 years ago

Since the last update, wp_ulike_get_most_liked_posts( ) only return the first 5 posts that match the criteria even if i put 100 in the numberposts parameter; here is the query i make:

wp_ulike_get_most_liked_posts( $numberposts = 14, array( 'post' ), 'post', 'week', 'like' )

only getting the first 5 posts; if i put numberposts 5 or less it works. This is strange it worked before the latest update, i did not change anything on my website.

Acheyy commented 4 years ago

I think someone deleted a line inside general-functions.php of the plugin.

$args = array(
            'post_type'   => $post_type,
            'posts_per_page' => $numberposts
        );

the line with 'posts_per_page'

Alimir commented 4 years ago

@Acheyy Yes, this line of code was deleted by mistake. We will solve this problem in the next few days.

Acheyy commented 4 years ago

Alright, it's fine for me now; but it should be solved in the next update. Cheers!