fix bug to show post.
This commit is contained in:
parent
e33e226983
commit
ae9bfbe051
@ -209,15 +209,14 @@ 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'];
|
||||
$query['category_name'] = $matches[1].$query['page'];
|
||||
unset($query['page']);
|
||||
if (isset($query['p'])) {
|
||||
$query['paged'] = $query['p'];
|
||||
unset($query['p']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user