$recent, 'post__in' => (array)$content_id, 'orderby' => 'post__in', 'posts_per_page' => absint( $recent_num ), 'ignore_sticky_posts' => true, ); ?>

'post', 'posts_per_page' => absint( $recent_num ), ); } $query = new WP_Query( $args ); if ( $query->have_posts() ) { $content = array(); while ( $query->have_posts() ) { $query->the_post(); $detail['image'] = get_the_post_thumbnail_url( get_the_id(), 'medium-large' ); $detail['url'] = get_the_permalink( ); $detail['id'] = get_the_id(); $detail['title'] = get_the_title(); $detail['content'] = wp_trim_words( get_the_content(), 10, ' ....' ); array_push( $content, $detail ); } wp_reset_postdata(); } if ( empty($content) ) { return; } $article_control = 1; $hentry_control = 0; $end = 0; for ($i=0; $i < 2 ; $i++) { if ( $article_control == 0 ) { $end = 1; } if ( $hentry_control == 1 ) { break; } ?>