Plugin Author
Ajay
(@ajay)
Is there a reason you don’t want to show the first post?
You could do this by writing your own custom loop. This code isn’t tested, but you might want to try this:
if(function_exists('get_crp_posts_id')) {
global $post;
$scores = get_crp_posts_id(array('postid' => $post->ID, 'limit' => 8));
$posts = wp_list_pluck( $scores, 'ID' );
$posts = array_slice( $posts, 7 ); // slice out the first element in the array
$args = array(
'post__in' => $posts,
'posts_per_page' => 7,
'category_name' => 'news',
'ignore_sticky_posts' => 1
);
$my_query = new WP_Query($args);
if ($my_query->have_posts()) {
while ($my_query->have_posts()) {
$my_query->the_post();
echo '<a href="' . get_permalink( get_the_ID() ) . '">';
the_title();
echo '</a>';
wp_reset_postdata();
wp_reset_query();
}
}
else {
}
}