Query for page content, and query for posts on the same page?
Use query link this. You are checking posts in $the_query. but you have used $query. <?php $custom_query = new WP_Query( ‘posts_per_page=4’ ); if ( $custom_query->have_posts() ) : while ( $custom_query->have_posts() ) : $custom_query->the_post(); ?> <h2><?php the_title(); ?></h2> <?php endwhile; else : get_template_part( ‘content’, ‘none’ ); endif; wp_reset_postdata(); ?>