Title: zworks's Replies | WordPress.org

---

# zworks

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type UI] Custom taxonomy pagination not working](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/)
 *  Thread Starter [zworks](https://wordpress.org/support/users/zworks/)
 * (@zworks)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/#post-8372765)
 * well, i got my original coding working by just changing the ‘paged’ variable 
   into ‘page’. But i don’t know how that works!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] W3TC Google Drive CDN 404 error](https://wordpress.org/support/topic/w3tc-google-drive-cdn-404-error/)
 *  Thread Starter [zworks](https://wordpress.org/support/users/zworks/)
 * (@zworks)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/w3tc-google-drive-cdn-404-error/#post-8343416)
 * So this particular issue was already identified ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type UI] Custom taxonomy pagination not working](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/)
 *  Thread Starter [zworks](https://wordpress.org/support/users/zworks/)
 * (@zworks)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/#post-8305320)
 * As we have stated in my original question, we have a taxonomy called `projectcat`
   and we have a template file named `taxonomy-projectcat.php`
 * And we have a term called `cuisine` belonging to the `projectcat` taxonomy.
 * The custom url rewrite slug in the taxonomy settings page is `renoinspiration`
 * So whenever we visit `/renoinspiration/cuisine` it loads the `taxonomy-projectcat.
   php` template and shows fine, means it shows the 8 posts, because we do the query
   as following:
 *     ```
        $paged = (get_query_var('page')) ? get_query_var('page') : 1;
                   $wp_query = new WP_Query();
                   $wp_query->query(array(
                   'post_type'=>'projects',
                   'paged' => $paged,
                   'posts_per_page' =>8,
                   ));
   
                     $args_page = array('post_type' => 'projects', 'tax_query' => array(array('taxonomy' => 'projectcat', 'field' => 'id','terms' => $term_id)), 'post_status' => 'publish', 'order' => 'DESC',  'posts_per_page' => 8, 'paged' => $paged,  'total' => $wp_query->max_num_pages);
                     $loop = new WP_Query( $args_page );
       ```
   
 * And at the end we have the following:
 *     ```
       <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
       				<div class="alignright"><?php previous_posts_link('Next Entries &rarr;') ?></div>
       		        <div class="alignleft"><?php next_posts_link('&larr; Previous Entries') ?></div>
   
       		        <?php } ?>
       ```
   
 * If we have more than 8 posts of this type, it’s fine on the 1st page and displays
   the pagination correctly, but when we click on the other links on the pagination
   we get a 404.
 * We really appreciate your time!
    -  This reply was modified 9 years, 8 months ago by [zworks](https://wordpress.org/support/users/zworks/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type UI] Custom taxonomy pagination not working](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/)
 *  Thread Starter [zworks](https://wordpress.org/support/users/zworks/)
 * (@zworks)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/#post-8304945)
 * Well, if i understand correctly, i think the link you provided mainly focuses
   on how to do a clean pagination, but my issue is not with generating the pagination,
   the pagination links are already generated correctly and exactly how it should
   be, but when we click the 2nd page or other pages it gives a 404 error.
 * In the rewrite rule, it works fine only when there is no ‘paged’ variable, but
   if we add the ‘paged’ variable then it gives the 404 error.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type UI] Custom taxonomy pagination not working](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/)
 *  Thread Starter [zworks](https://wordpress.org/support/users/zworks/)
 * (@zworks)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/custom-taxonomy-pagination-not-working-2/#post-8301580)
 * yes, every time i change change/add rewrite rules i flush the rewrite rules.

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