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 (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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user