add new banner

This commit is contained in:
2021-12-01 17:44:40 +03:00
parent 2026095ca1
commit 989119aead
2 changed files with 18 additions and 4 deletions

View File

@@ -432,4 +432,18 @@ function filter_nav_menu_item_title( $title, $item, $args, $depth ) {
}
return $title;
}
}
add_action( 'pre_get_posts', function ($query) {
if ( ! is_admin() && $query->is_main_query() ) {
// не админка и основной цикл страницы
if ( is_category( 'arkhiv' ) ) {
$query->set( 'posts_per_page', 9 );
}
}
});