Please disable your Ad Blocker to better interact with this website.

BLOG

See what we're whipping up!

// WP_Query arguments
$args = array(
    'post_type'              => array( 'post' ),
    'post_status'            => array( 'publish' ),
    'posts_per_page'         => '20',
);

// The Query
$query = new WP_Query( $args );

// The Loop
if ( $query->have_posts() ) {
    while ( $query->have_posts() ) {
        $query->the_post();
        // do something like echo the title
    }
} else {
    // no posts found, uh oh!
}

// Restore original Post Data
wp_reset_postdata();

No comments yet