[wp-trac] [WordPress Trac] #61393: Trailing Slash Issue in Category Pagination URLs with the_posts_pagination()
WordPress Trac
noreply at wordpress.org
Fri Feb 14 06:26:03 UTC 2025
#61393: Trailing Slash Issue in Category Pagination URLs with
the_posts_pagination()
-------------------------------------------------+-------------------------
Reporter: hmbashar | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Permalinks | Version:
Severity: normal | Resolution:
Keywords: has-screenshots has-patch has- | Focuses:
testing-info needs-testing has-unit-tests |
good-first-bug reporter-feedback |
-------------------------------------------------+-------------------------
Comment (by ankitkumarshah):
Hi @adamsilverstein,
Thank you for pointing this out.
I found that the second parameter for `user_trailingslashit( $link )`
would be `'paged'` as the function we are working with is
`paginate_links()`. Technically, the function can be used to create a
paginated link list for any area.
The same is done in line number 4516 in the `paginate_links()` function:
{{{
$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit(
$wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
}}}
Reference - https://github.com/WordPress/wordpress-
develop/blob/b8b72e62481d6fd37e5ec012d9af31722bb2a43f/src/wp-includes
/general-template.php#L4516
I have updated my PR accordingly
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61393#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list