title: Wordpress paginate custom post type
body: <p>I have a page called News (using page template <code>page-newslist.php</code>), which is supposed to display posts from the custom post type also named News. I realize that having both with the same name causes issues, so when registering the custom post type, I have a rewrite to differentiate it from the page:</p>
  
  <pre><code>'rewrite' =&gt; array('slug' =&gt; 'news-article', 'with_front' =&gt; true),
  </code></pre>
  
  <p>I can get the query working and displaying the posts properly, but after all of the <a href="https://stackoverflow.com/questions/3325682/wordpress-custom-post-type-pagination">articles</a> <a href="http://css-tricks.com/snippets/wordpress/paginate-custom-post-types/" rel="nofollow noreferrer">and</a> <a href="https://stackoverflow.com/questions/12955950/create-pagination-for-custom-post-types-in-wordpress">posts</a> I've read, I cannot get the pagination to work. Nothing ever shows up for the pagination.</p>
  
  <p>After no success with using the page template query, I tried the <code>archive-news.php</code> method, where it would automatically display the posts from the custom post type. The pagination <em>does</em> work there. The downside of using this method is that there isn't a 'physical' page to tie it to (which would also have custom fields, ability to be nicely added (not hard-coded) into menus, etc.)</p>
  
  <p>Here is the stripped-down code registering the custom post type:</p>
  
  <pre><code>register_post_type('news', array(
      'label' =&gt; 'News',
      'capability_type' =&gt; 'post',
      'hierarchical' =&gt; false,
      'rewrite' =&gt; array('slug' =&gt; 'news-article', 'with_front' =&gt; true),
      'query_var' =&gt; true,
      'has_archive' =&gt; true,
  ));
  </code></pre>
  
  <p>And then the code for the page template:</p>
  
  <pre><code>$paged = 1;  
  if ( get_query_var('paged') ) $paged = get_query_var('paged');  
  if ( get_query_var('page') ) $paged = get_query_var('page');
  $args = array(
      'post_type' =&gt; 'news',
      'post_status' =&gt; 'publish',
      'posts_per_page' =&gt; 1,
      'paged' =&gt; $paged
  );
  
  $my_query = null;
  $my_query = new WP_Query($args);
  
  if($my_query-&gt;have_posts()):
  
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  
  ...
  
  endwhile;
  
  endif;
  
  wp_reset_query();
  
  // Attempt method 1
  posts_nav_link(' — ', __('&amp;laquo; Newer Posts'), __('Older Posts &amp;raquo;'));
  
  // Attempt method 2
  previous_posts_link('&amp;laquo; Newer');
  next_posts_link('Older &amp;raquo;');
  </code></pre>
  
  <p>Any ideas what's wrong?</p>