new limit authors
This commit is contained in:
@@ -664,6 +664,7 @@ add_action( 'init', function () {
|
|||||||
|
|
||||||
add_action( 'pre_get_posts', function ($query) {
|
add_action( 'pre_get_posts', function ($query) {
|
||||||
|
|
||||||
|
|
||||||
if ( ! is_admin() && $query->is_main_query() && is_category() ) {
|
if ( ! is_admin() && $query->is_main_query() && is_category() ) {
|
||||||
// не админка и основной цикл страницы
|
// не админка и основной цикл страницы
|
||||||
|
|
||||||
@@ -682,12 +683,16 @@ add_action( 'pre_get_posts', function ($query) {
|
|||||||
$query->set( 'posts_per_page', 25 );
|
$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