new limit authors
This commit is contained in:
@@ -664,6 +664,7 @@ add_action( 'init', function () {
|
||||
|
||||
add_action( 'pre_get_posts', function ($query) {
|
||||
|
||||
|
||||
if ( ! is_admin() && $query->is_main_query() && is_category() ) {
|
||||
// не админка и основной цикл страницы
|
||||
|
||||
@@ -682,13 +683,17 @@ add_action( 'pre_get_posts', function ($query) {
|
||||
$query->set( 'posts_per_page', 25 );
|
||||
}
|
||||
|
||||
if (is_author()){
|
||||
$query->set( 'posts_per_page', 24 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( !is_admin() && $query->is_main_query() && is_author()) {
|
||||
$query->set( 'posts_per_page', 24 );
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user