Post loop for all taxonomy terms

You can get all the terms in a custom taxonomy using the following code: $terms = get_terms( ‘development-category’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { $loop = new WP_Query( array( ‘development-category’ => $term->slug, ‘post_type’ => ‘developments’ ) ); ?> …. } }

pre_get_posts for two loops on same page

Have a look at WP_Query when you need to loop through posts. <?php $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘post__not_in’ => array(), ‘order’ => ‘DESC’, ); $the_query = new WP_Query($args); // Show the first 3 posts while($the_query->have_posts()) { $the_query->the_post(); echo ‘<h2>’.get_the_title().'</h2>’; // Have we shown 3 yet? Break then. … Read more