Title: apsDev's Replies | WordPress.org

---

# apsDev

  [  ](https://wordpress.org/support/users/apsdev/)

 *   [Profile](https://wordpress.org/support/users/apsdev/)
 *   [Topics Started](https://wordpress.org/support/users/apsdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/apsdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/apsdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/apsdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/apsdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/apsdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP_Query & pagination not working](https://wordpress.org/support/topic/wp_query-amp-pagination-not-working/)
 *  [apsDev](https://wordpress.org/support/users/apsdev/)
 * (@apsdev)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/wp_query-amp-pagination-not-working/#post-1420240)
 * Thanks for your reply.
 * I have tried this as well but it is still NOT working 🙁
 * More info …
 * I am on archive.php where I m showing posts related to passed category i.e. (?
   cat=[num] in the query string)
 * The default page is coming and showing the first records (I have set post_per_page
   to 1) and also showing 5 pages in page nav. When I click on page 2/3/4/5 it shows
   a 404 page 🙁
 * Hope I am a bit clear this time.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WP_Query & pagination not working](https://wordpress.org/support/topic/wp_query-amp-pagination-not-working/)
 *  [apsDev](https://wordpress.org/support/users/apsdev/)
 * (@apsdev)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/wp_query-amp-pagination-not-working/#post-1420236)
 * Hi ..
 * I am facing the same problem and the above solution is not working for me 🙁
 * I m getting 404 page when I click on page 2 or 3 … here is my code
 * $catID = get_query_var(‘cat’);
    $catName = strtolower(get_cat_name($catID));
 * $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    $wp_query = 
   new WP_Query(); $wp_query->query(“category_name=$catName&paged=$paged&posts_per_page
   =1”);
 * <?php if ($wp_query->have_posts()) : ?>
    <?php while ($wp_query->have_posts()):
   $wp_query->the_post(); ?> // data .. <?php endwhile; ?> <?php endif; ?>
 * Any help!
 * Thanks
    Ashish

Viewing 2 replies - 1 through 2 (of 2 total)