WordPress custom query and loop example for post

              
                <?php 

                  // Arguments Variable
                  $args = ( array(
                     'post_type'       => 'post',
                     'posts_per_page'       => 3,
                  ) );
                  
                  // The Query
                  $query = new WP_Query ( $args );
                  
                  // The Loop
                  $query = new WP_Query ( $args );
                  while ( $query -> have_posts() ) {
                     $query -> the_post();
                  }

                ?>