add new banner
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user