From 989119aead72d8100b9fce4accfdf40093e6edeb Mon Sep 17 00:00:00 2001 From: AK Delfin Date: Wed, 1 Dec 2021 17:44:40 +0300 Subject: [PATCH] add new banner --- footer.php | 6 +++--- functions.php | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/footer.php b/footer.php index 62e38ac..95a9b2f 100644 --- a/footer.php +++ b/footer.php @@ -75,8 +75,8 @@
- - + +
@@ -86,7 +86,7 @@ - '']);?> + '']);?> 'mob-lite']);?> diff --git a/functions.php b/functions.php index 24b0639..e4000d7 100644 --- a/functions.php +++ b/functions.php @@ -432,4 +432,18 @@ function filter_nav_menu_item_title( $title, $item, $args, $depth ) { } return $title; -} \ No newline at end of file +} + + +add_action( 'pre_get_posts', function ($query) { + + if ( ! is_admin() && $query->is_main_query() ) { + // не админка и основной цикл страницы + + if ( is_category( 'arkhiv' ) ) { + $query->set( 'posts_per_page', 9 ); + } + + } + +}); \ No newline at end of file