i make two list theme
the posts have featured image and title, but empty content. i want get this list.
and other posts with content list.
I don't have any idea, help me please
$args = array(
'post_type' => 'post',
'post_status' => array('publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash')
'posts_per_page' => -1,
'orderby' => 'ID',
'order' => 'desc');
$blank_posts = array();
$posts = new WP_Query( $args );
if ( $posts->have_posts() ) :
while ( $posts->have_posts() ) : $post = $posts->the_post();
$content = get_the_content();
if(empty($content)) {
array_push( $blank_posts, $post);
}
endwhile;
endif;
/* print all blank content posts */
print_r($blank_posts);
this code doesn't work, Please give me some detailed code, thanks