zworks
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Post Type UI] Custom taxonomy pagination not workingwell, i got my original coding working by just changing the ‘paged’ variable into ‘page’. But i don’t know how that works!
Forum: Plugins
In reply to: [W3 Total Cache] W3TC Google Drive CDN 404 errorSo this particular issue was already identified ?
Forum: Plugins
In reply to: [Custom Post Type UI] Custom taxonomy pagination not workingAs we have stated in my original question, we have a taxonomy called
projectcat
and we have a template file namedtaxonomy-projectcat.php
And we have a term called
cuisine
belonging to theprojectcat
taxonomy.The custom url rewrite slug in the taxonomy settings page is
renoinspiration
So whenever we visit
/renoinspiration/cuisine
it loads thetaxonomy-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 →') ?></div> <div class="alignleft"><?php next_posts_link('← 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 8 years, 4 months ago by zworks.
Forum: Plugins
In reply to: [Custom Post Type UI] Custom taxonomy pagination not workingWell, 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
In reply to: [Custom Post Type UI] Custom taxonomy pagination not workingyes, every time i change change/add rewrite rules i flush the rewrite rules.