diff --git a/functions.php b/functions.php index 347f67c..ecdef5e 100644 --- a/functions.php +++ b/functions.php @@ -209,13 +209,12 @@ function cbsonline_fix_category_pagination($query = []) { if (isset($query['category_name']) && isset($query['page'])) { if (preg_match('/^(?:category\/)?(.+)\/page$/', $query['category_name'], $matches)) { - $query['category_name'] = $matches[1]; - } - $query['category_name'] .= $query['page']; - unset($query['page']); - if (isset($query['p'])) { - $query['paged'] = $query['p']; - unset($query['p']); + $query['category_name'] = $matches[1].$query['page']; + unset($query['page']); + if (isset($query['p'])) { + $query['paged'] = $query['p']; + unset($query['p']); + } } }