Skip to main content
'post','posts_per_page' => 2 ); $post_query = new WP_Query($args); if($post_query -> have_posts() ) { while($post_query->have_posts() ) { $post_query->the_post(); ?>
<?php
    $args = array(
        'post_type' => 'post','posts_per_page' => 2
    );

    $post_query = new WP_Query($args);
if($post_query -> have_posts() ) {
  while($post_query->have_posts() ) {
    $post_query->the_post();
     ?>
    <h2><?php the_title(); ?></h2>
    <h2><?php the_content(); ?></h2>
    <?php
  }
}
?>

} } ?>

'post','posts_per_page' => 2 ); $post_query = new WP_Query($args); if($post_query -> have_posts() ) { while($post_query->have_posts() ) { $post_query->the_post(); ?>
<h2><?php the_title(); ?></h2>
<h2><?php the_content(); ?></h2>
<?php

} } ?>

<?php
    $args = array(
        'post_type' => 'post','posts_per_page' => 2
    );

    $post_query = new WP_Query($args);
if($post_query -> have_posts() ) {
  while($post_query->have_posts() ) {
    $post_query->the_post();
     ?>
    <h2><?php the_title(); ?></h2>
    <h2><?php the_content(); ?></h2>
    <?php
  }
}
?>
Source Link

'post','posts_per_page' => 2 ); $post_query = new WP_Query($args); if($post_query -> have_posts() ) { while($post_query->have_posts() ) { $post_query->the_post(); ?>
<h2><?php the_title(); ?></h2>
<h2><?php the_content(); ?></h2>
<?php

} } ?>