Once activated, only posts from the current category are displayed in your loop (no posts from sub cats).
As of April 2026, No Sub-Category Posts in Loops is a WordPress cats plugin with 100 active installations and a 5/5 rating from 3 reviews. It has been downloaded 6.0K+ times in total. Requires WordPress 3.1+ and PHP false+. Available on WordPress.org since 2009. Last updated 10 years ago — may have compatibility concerns. Top alternative: catnip.
Once activated, only posts from the current category are displayed in your loop (no posts from sub cats).
That’s all it does. No options. If you find you need options, let me know and I’ll build them into it.
As of 0.4 I remove the filter after the main query is built so that it doesn’t interfere with widgets.
If you have a custom query or call wp_query on a category archive template, you’ll need to add and remove the filters before and after your query. Below is an example of how to do this if you use wp_query. Again, this is not necessary unless you have modified queries in a template file.
add_filter( 'posts_where', 'ft_nscp_mod_where' );
query_posts( array( 'your-custom' => 'args' ) );
remove_filter( 'posts_where', 'ft_nscp_mod_where' );
Its important that…
| WordPress | 3.1+ requiredTested up to 4.4.34 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.