title: Repeating posts on pages
body: <p>I'm building a theme for wordpress. I'm trying to show some posts in the page, it is working. Although when you go to the seccod page the loop starts on the first post and not on the 31st as it should. I guess it is a problem on my loop but I'm not finding it.</p>
  
  <pre><code>    &lt;section class="section"&gt;
    &lt;?php
    $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
    $args = array(
      'post_type' =&gt; 'post', // tipo de post (geralmente é post)
      'posts_per_page' =&gt; 30, // posts por página (esse numero tem que ser maior que o que tá no admin [configurações &gt; leitura &gt; as páginas do blog mostram no máximo] )
      'cat' =&gt; '9',
      );
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query-&gt;query($args);
    ?&gt;
    &lt;div class="container galerias"&gt;
    &lt;?php if ( $wp_query-&gt;have_posts() ) : ?&gt;
      &lt;?php while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ?&gt;
  
      &lt;a class="galeria-holder" href="&lt;?php the_permalink(); ?&gt;"&gt;
        &lt;div class="img-trabalhos" style="background-image: url(&lt;?php the_field('cartaz_do_trabalho'); ?&gt;);" &gt; &lt;/div&gt;
        &lt;h4 class="heading-5"&gt;&lt;?php the_field('titulo'); ?&gt;&lt;/h4&gt;
      &lt;/a&gt;
  
     &lt;?php endwhile; ?&gt;
  &lt;/div&gt;
  
  &lt;?php if ($wp_query-&gt;max_num_pages &gt; 1) { // verifica se tem mais de uma página  ?&gt; 
  &lt;!-- naveção &lt; anterior  próximo  --&gt;
   &lt;div class="div-block-2"&gt;
      &lt;div&gt;
        &lt;?php echo get_previous_posts_link( 
          '&lt;span class="arrow-link w-inline-block"&gt;&amp;#60;&lt;/spam&gt;'
        ); // posts mais recentes ?&gt;
      &lt;/div&gt;   
      &lt;div&gt;
        &lt;?php echo get_next_posts_link( 
          '&lt;span class="arrow-link w-inline-block"&gt;&amp;#62;&lt;/spam&gt;', $wp_query-&gt;max_num_pages 
        ); // display older posts link ?&gt;
      &lt;/div&gt;
        &lt;?php } ?&gt;
   &lt;/div&gt;
  &lt;?php wp_reset_query(); else : ?&gt;
  &lt;p&gt; Ainda Não temos novidades :( &lt;/p&gt;
  &lt;?php endif; ?&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>Here is the page if someone want to check <a href="http://mariapadilhaatriz.com.br/wordpress/trabalhos/" rel="nofollow noreferrer">http://mariapadilhaatriz.com.br/wordpress/trabalhos/</a></p>