From ae9bfbe051833e2b2d72fcf35263f2318c77fa14 Mon Sep 17 00:00:00 2001 From: NIU Administrator Date: Fri, 15 Jan 2021 18:46:16 +0900 Subject: [PATCH] fix bug to show post. --- functions.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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']); + } } }