Home Forums WTI Like Post PRO Most liked shows the same posts in pagination Reply To: Most liked shows the same posts in pagination

#281
Webtechideas
Keymaster

We have sent you a modified template file. Please check that and let us know if that worked for you or not. For reference the modified code to be used is put below

// Get the current page
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;

// Query to get all posts sorted by like count after a specific date
$the_query = new WP_Query(
			array(
				'post_type' => 'post',
				'posts_per_page' => get_option('posts_per_page'),
				'paged' => $paged,
				'meta_key' => '_wti_like_count',
				'orderby' => 'meta_value_num',
				'order' => 'DESC'
			)
		);