fix bug to show post.

This commit is contained in:
CBS Information System 2021-01-15 18:46:16 +09:00
parent e33e226983
commit ae9bfbe051

View File

@ -209,13 +209,12 @@ function cbsonline_fix_category_pagination($query = [])
{ {
if (isset($query['category_name']) && isset($query['page'])) { if (isset($query['category_name']) && isset($query['page'])) {
if (preg_match('/^(?:category\/)?(.+)\/page$/', $query['category_name'], $matches)) { if (preg_match('/^(?:category\/)?(.+)\/page$/', $query['category_name'], $matches)) {
$query['category_name'] = $matches[1]; $query['category_name'] = $matches[1].$query['page'];
} unset($query['page']);
$query['category_name'] .= $query['page']; if (isset($query['p'])) {
unset($query['page']); $query['paged'] = $query['p'];
if (isset($query['p'])) { unset($query['p']);
$query['paged'] = $query['p']; }
unset($query['p']);
} }
} }