Query Anything On WordPress Anywhere
By OutsourcedContent — on August 27, 2017 <?php $args = array( ‘posts_per_page’ => ‘3’, ‘post_status’ => ‘publish’, ); $recent_posts = wp_get_recent_posts( $args ); // Loop each post foreach( $recent_posts as $recent ) { echo get_the_title($recent[“ID”]); echo $recent[“post_content”]; } wp_reset_query(); ?> Refer the WP_Query class reference for a complete list of arguments. Another Approach <?php …