Closed benbrehaut closed 7 years ago
For some stupid reason, WordPress by deafult function wp_get_recent_posts shows draft posts, which is stupid.
wp_get_recent_posts
Can be fixed with adding to the array;
$recent_posts = wp_get_recent_posts(array( 'orderby' => 'post_date', 'numberposts' => 3, 'post_type' => 'post', 'post_status' => 'publish,', ) );
For some stupid reason, WordPress by deafult function
wp_get_recent_posts
shows draft posts, which is stupid.Can be fixed with adding to the array;
$recent_posts = wp_get_recent_posts(array( 'orderby' => 'post_date', 'numberposts' => 3, 'post_type' => 'post', 'post_status' => 'publish,', ) );