correct mobile adv

This commit is contained in:
2021-12-21 15:44:24 +03:00
parent d3f8de46ef
commit f4729c8193
5 changed files with 44 additions and 25 deletions

View File

@@ -615,12 +615,14 @@ add_action( 'init', function () {
add_action( 'pre_get_posts', function ($query) {
if ( ! is_admin() && $query->is_main_query() ) {
if ( ! is_admin() && $query->is_main_query() && is_category() ) {
// не админка и основной цикл страницы
if ( is_category( 'arkhiv' ) ) {
$query->set( 'posts_per_page', 9 );
}
$query->set( 'posts_per_page', 23 );
//if ( is_category( 'arkhiv' ) ) {
// $query->set( 'posts_per_page', 19 );
// }
}