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,15 +209,14 @@ 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'];
}
$query['category_name'] .= $query['page'];
unset($query['page']); unset($query['page']);
if (isset($query['p'])) { if (isset($query['p'])) {
$query['paged'] = $query['p']; $query['paged'] = $query['p'];
unset($query['p']); unset($query['p']);
} }
} }
}
return $query; return $query;
} }