title: Wordpress loop showing blank page
body: <p>I'm using the code below to display an Owl Carousel of pages that have the same parent page as the current page, it works but the first item in the loop is blank.</p>
  <p>Any Ideas? Thanks</p>
  <pre><code>&lt;?php
  // [service_page_carousel]
  function service_page_carousel_func() {
          global $post;
          $direct_parent = $post-&gt;post_parent;
          $args = array(
              'post_type'      =&gt; 'page',
              'posts_per_page' =&gt; -1,
              'post_parent'    =&gt; $direct_parent,
              'order'          =&gt; 'ASC',
              'orderby'        =&gt; 'menu_order',
              'post__not_in'   =&gt; array( $post-&gt;ID ),
          );
          
          $query = new WP_Query( $args );
          
          if ( $query-&gt;have_posts() ) : ?&gt;
          
          &lt;div class=&quot;service-page-owl-carousel owl-carousel owl-theme owl-loaded owl-drag&quot;&gt;
          
          &lt;?php while ( $query-&gt;have_posts() ) : $query-&gt;the_post();
                  // Featured image
                  $feat_image = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID), &quot;full&quot;, true);
          ?&gt;
                  &lt;div class=&quot;item&quot;&gt;
                      &lt;div class=&quot;service&quot;&gt;
                          &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt; 
                              &lt;div class=&quot;featured-img&quot; style=&quot;background-image: url(&lt;?php echo $feat_image[0]; ?&gt;);&quot;&gt;&lt;/div&gt;
                          &lt;/a&gt;
                          &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;
                              &lt;h3 class=&quot;brand-secondary&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
                          &lt;/a&gt;
                          &lt;div class=&quot;text&quot;&gt;&lt;?php the_excerpt(); ?&gt;&lt;/div&gt;
                          &lt;p class=&quot;learn-more&quot;&gt;&lt;a class=&quot;btn primary&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;Learn More&lt;/a&gt;&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
          &lt;?php endwhile; wp_reset_query(); ?&gt;
          &lt;/div&gt;
          
      &lt;?php endif;
  
  } 
  add_shortcode( 'service_page_carousel', 'service_page_carousel_func' );
  </code></pre>