How to make 10 post of one category
You can use pre_get_posts and is_category conditional tags to set posts_per_page to 10 for category pages. Here is a working exacmple function wpse_posts_cat_pages( $query ) { if ( $query->is_category() && $query->is_main_query() ) { $query->set( ‘posts_per_page’, ’10’ ); } } add_action( ‘pre_get_posts’, ‘wpse_posts_cat_pages’ ); What this code do: Check if it is the main query $query->is_main_query() … Read more