[wp-trac] [WordPress Trac] #61393: Trailing Slash Issue in Category Pagination URLs with the_posts_pagination()
WordPress Trac
noreply at wordpress.org
Wed Mar 26 23:43:34 UTC 2025
#61393: Trailing Slash Issue in Category Pagination URLs with
the_posts_pagination()
-------------------------------------------------+-------------------------
Reporter: hmbashar | Owner: audrasjb
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Permalinks | Version:
Severity: normal | Resolution:
Keywords: has-screenshots has-testing-info | Focuses:
has-patch has-unit-tests |
-------------------------------------------------+-------------------------
Comment (by peterwilsoncc):
I've created a [https://github.com/WordPress/wordpress-develop/pull/8591
pull request] taking a second pass at this.
Rather than modifying the links as they are generated, it takes in to
consideration whether a site's permalinks uses trailing slashes and
modifies the default values of `$base` and `$format` accordingly.
This will ensure the function doesn't add trailing slashes to links
unexpectedly, see #63123, while avoiding the incorrect links and 301
redirects on sites that do not use trailing slashes.
I've included a bunch of tests but further suggestions are welcome.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61393#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list