ajaydsouza
4/20/2015 - 10:18 PM

Top 10 and Ajax Load More

Top 10 and Ajax Load More

<?php

$features = get_tptn_pop_posts(); // Array of posts

$features = wp_list_pluck( $features, 'postnumber' );

if ( $features ) {
	//Implode the posts and set a varible to pass to our exclude param.
	$postsIn = implode(",", $features);
}

echo do_shortcode('[ajax_load_more post__in="'.$postsIn.'" orderby="post__in"]');

?>