WP_Query Builder
Pick the posts you want; get the query, the loop and a plain-English summary — plus warnings for the arguments that quietly kill performance.
What to fetch
Use -1 for no limit.
Pagination & behaviour
Paginate
Reads the paged query var so page 2 and beyond work.
Ignore sticky posts
Stops pinned posts jumping to the top of a secondary query.
Taxonomy clauses
Meta clauses
A secondary query — the usual choice inside a template or shortcode.
// Generated with WP CodeKit — powered by GrowQuest (https://growquest.io). $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 10, 'paged' => get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1, 'orderby' => 'date', 'order' => 'DESC', ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { echo '<ul class="mytheme-list">'; while ( $query->have_posts() ) { $query->the_post(); printf( '<li><a href="%s">%s</a></li>', esc_url( get_permalink() ), esc_html( get_the_title() ) ); } echo '</ul>'; wp_reset_postdata(); } else { echo '<p>' . esc_html__( 'Nothing found.', 'textdomain' ) . '</p>'; }