>
Download This Plugin | |
Download Elegant Themes | |
Name | No Sub-Category Posts in Loops |
Version | 0.4 |
Author | FullThrottle Development |
Rating | 100 |
Last updated | 2011-08-25 11:23:00 |
Downloads |
3550
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
No Sub-Category Posts in Loops plugin added 9 bytes of resources to the Home page and 24 bytes of resources to the sample Post page.
No Sub-Category Posts in Loops plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! No Sub-Category Posts in Loops plugin ads no tables to your Wordpress blog database.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 you remove what you add.