[wp-trac] [WordPress Trac] #63123: Numbered Pagination Adds a Trailing / To URLs That Generates a 404 Error

WordPress Trac noreply at wordpress.org
Wed Mar 19 05:01:30 UTC 2025


#63123: Numbered Pagination Adds a Trailing / To URLs That Generates a 404 Error
--------------------------+-----------------------
 Reporter:  jeffr0        |       Owner:  audrasjb
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  6.8
Component:  Permalinks    |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------

Comment (by kawsar007):

 I confirmed this issue on WP 6.8 Beta 3 with Twenty Twenty-Five. Not
 present in 6.7.2.

 Here's a quick workaround:

 function remove_trailing_slash_from_pagination($link) {
     if (strpos($link, 'page/') !== false) {
         $link = untrailingslashit($link);
     }
     return $link;
 }
 add_filter('paginate_links', 'remove_trailing_slash_from_pagination');

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


More information about the wp-trac mailing list