Describe the bug
In our WordPress setup we have set category_base to an empty string intentional.
This causes an issue with Category_Pager:
|
if ( empty( $category_base ) ) { |
If the category_base is an empty string, the class adds "category" to the URL hardcoded.
This means, we have later to fix the created URL:
add_filter( 'paginate_links', function( $link ) {
$link = str_replace( '/category/', '/', $link );
return preg_replace( '/\/$/', '', $link );
}, 10, 1 );
To Reproduce
Steps to reproduce the behavior:
- Go to WordPress settings
- Set category base to an empty string
- Browse Paginated Category pages like example.com/my_category/page/2
- Paginated links contain /category/my_category/page/x
Screenshots
Expected behavior
Category_Pages should respect an empty string as an category_base.
Describe the bug
In our WordPress setup we have set category_base to an empty string intentional.
This causes an issue with Category_Pager:
newspack-plugin/includes/class-category-pager.php
Line 46 in 2b3efad
If the category_base is an empty string, the class adds "category" to the URL hardcoded.
This means, we have later to fix the created URL:
To Reproduce
Steps to reproduce the behavior:
Screenshots
Expected behavior
Category_Pages should respect an empty string as an category_base.