Pagination on filters with taxonomy slug
-
I think I found a bug during the development of a website.
The thing is:
- The URLs like: http://mysite/myCPT/myTaxonomy/value/page/2 were working
- The URLs like: http://mysite/myCPT/myTaxonomyRewriteSlug/value/page/2 weren’t working
I looked at rewrite rules and i found something like this:
myCPT?(:/myTaxonomyRewriteSlug1/([^/]+))??(:/myTaxonomyRewriteSlug2/([^/]+))?page/([0-9]{1,})/?$
So, it’s like the initial ‘/’ for page is not there.
I edited in the plugin /admin/class-beautiful-taxonomy-filters-rewrite-rules.php:117$new_paged_rewrite_rule = $new_rewrite_rule . 'page/([0-9]{1,})';
to
$new_paged_rewrite_rule = $new_rewrite_rule . '/page/([0-9]{1,})';
(just added initial / to page)Now this rewrite rule looks like
myCPT?(:/myTaxonomyRewriteSlug1/([^/]+))??(:/myTaxonomyRewriteSlug2/([^/]+))?/page/([0-9]{1,})/?$
And for now it’s working fine for me, i don’t know if this can be a problem for other things but i reviewed the rewrites and the only who change is this one.
- The topic ‘Pagination on filters with taxonomy slug’ is closed to new replies.