title: WP_Query + Infinite Scroll
body: <p>I've stucked while working on my brand new blog template (on wordpress). I've got following query/php code:</p>
  
  <pre><code>echo '&lt;div id="posts-container" class="fusion-blog-layout-medium fusion-blog-infinite fusion-posts-container-infinite fusion-blog-archive fusion-clearfix"&gt;';
  
  $args = array( 'post_type' =&gt; 'era', 'post_status' =&gt; array('publish', 'future'), 'paged' =&gt; $paged );
  
  $custom_query = new WP_Query($args);
  
  while($custom_query-&gt;have_posts()) : $custom_query-&gt;the_post();
  
  $post_classes = $post_class . ' ' . $alignment_class . ' ' . $thumb_class . ' post fusion-clearfix';
  ob_start();
  post_class( $post_classes );
  $post_classes = ob_get_clean();
  
  echo '&lt;article id="post-' . get_the_ID() . '" ' . $post_classes . '&gt;';
  
  get_template_part( 'new-slideshow' );
  
  echo '&lt;div class="fusion-post-content koncert post-content"&gt;';
  
  echo ( '&lt;h2 class="entry-title fusion-post-title" data-fontsize="18" data-lineheight="27"&gt;&lt;a href="' . get_post_permalink( '','','true') . '"&gt;' .get_the_title() . '&lt;/a&gt;&lt;/h2&gt;' );
  
  if ( get_field( "data_i_miejsce_koncertu", get_the_ID() ) ) {
      echo ( '&lt;div class="lista-koncert-podtytul"&gt;' . get_field( "data_i_miejsce_koncertu", get_the_ID() ) . '&lt;/div&gt;' );
  }
  
  echo '&lt;div class="fusion-post-content-container"&gt;';
  
  do_action( 'avada_blog_post_content' );
  
  if ( get_field( "opis", get_the_ID() ) ) {
      echo '&lt;div class="lista-koncert-opis"&gt;' . wp_trim_words(get_field( "opis", get_the_ID() ), 60, ' [...]') . '&lt;br&gt;&lt;br&gt;&lt;a href="' . get_post_permalink( '','','true') . '"&gt;Zobacz więcej &amp;gt;&lt;/a&gt;&lt;/div&gt;';
  }
  
  echo '&lt;/div&gt;';
  echo '&lt;/div&gt;'; // End post-content.
  echo '&lt;/article&gt;';
  
  endwhile;
  wp_reset_postdata(); // reset the query
  
  echo '&lt;/div&gt;';
  </code></pre>
  
  <p>What I would like to achieve is to not have regular pagination (I've already removed the controls from my template), but I would like to use jquery infinite scroll script. But being honest - i have no clue how to even start ;/ mainly because there are no that many live examples/tutorials in the internet.. thanks for any tips</p>