On my Wordpress website I have two categories: news and club. How to set number of posts per page to 10 for news category and 4 posts per page for club category?
I have set number of posts per page in Settings > Reading to 10 and news works as I want but not club
I have custom loop in club category where I set posts_per_page to 4. In category-club.php I have
$args=array(
'category_name'=>'club',
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 4,
'orderby' => 'date',
'order' => 'desc',
'paged' => ((get_query_var('paged')) ? get_query_var('paged') : 1)
);
But there is problem when I switch to page 2 of posts in this category. I get 404 error. I think it's because I have less than 10 posts in this category.
Can anyone tell me what should I do to get second and next pages work?