I have a few custom post types with custom categories – and i also use the regular posts page for news. At the moment i can only change the number of posts through Settings > Reading > Number of posts – but I would need to have different number of of posts on the CPT category pages. I tried something like this in functions.php:
/* Set limit of category pages to 99 */ function num_posts_archive_project_ie($query) { if (!is_admin() && $query->is_archive('expert_db') && $query->is_main_query()) { $query->set('posts_per_page', 99); } return $query; }
But to no success…:/ Any pointers or suggestions appreciated. Cheers! t