[wp-trac] [WordPress Trac] #8905: Category pagination broken with certain permalink structures

WordPress Trac noreply at wordpress.org
Wed Jan 27 10:15:52 UTC 2021


#8905: Category pagination broken with certain permalink structures
---------------------------------------+-----------------------------
 Reporter:  rmccue                     |       Owner:  (none)
     Type:  defect (bug)               |      Status:  assigned
 Priority:  normal                     |   Milestone:  Future Release
Component:  Permalinks                 |     Version:  2.7
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+-----------------------------

Comment (by zeshanb):

 Hi there,

 Paginate_links function inside page template works fine. I can display a
 category with pagination using a page template pagetemplate-
 categoryname.php but not a category-categoryname.php, or even the root
 category.php template in a theme.

 For slug page mentioned above the paginate_links would look like this:

 {{{
 <?php
                                         echo paginate_links( array(
                                                 'format' => 'page/%#%',
                                                 'current' => max( 1,
 get_query_var('paged') ),
                                                 'total' =>
 $wp_query->max_num_pages,
                                                 'prev_next'    => True,
                                                 'prev_text'    => __("<i
 class=\"material-icons\">chevron_left</i>"),
                                                 'next_text'    => __("<i
 class=\"material-icons\">chevron_right</i>"),
                                                 'type' => 'list',
                                         ));
                                 ?>
 }}}

 There a plugin being offered for category pagination when this should be a
 core feature of a content management system:

 https://wordpress.org/support/plugin/category-pagination-fix/reviews/

 Thank you for your time.

 Regards,

 Zeshan

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/8905#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list