TDO Tag Plugin and excluding categories
I am using the TDO Tag plugin and it works great! however i have encountered a random stumbling block which i wonder if you could help me with!?
basically on a WordPress category archive page, posts from that category and all its child categories are displayed.
I want to limit the category archive page to just display the posts that have been categorized in that category, and not in any of its children categories.
For example, imagine there is category ‘A’ and ‘A’ contains children categories ‘b’, ‘c’ and ‘d’. When users click on category ‘A’ i just want to display posts in category ‘A’ and not any from children ‘b’, ‘c’ and ‘d’.
The only way i have found to do this is through a custom wordpress query (specifically using the ‘category__in’ function) before the loop. This is the code i tried to use based on this suggestion: http://www.kristarella.com/2010/03/wordpress-exclude-child-categories-from-category-archives/
The code i use before the loop is:
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
$current_cat = get_query_var(‘cat’);
‘category__in’ => array($current_cat),
‘paged’ => $paged
However when i try to use this function, it breaks the ‘TDO Tags’ plugin.
The website i am developing this for is here: http://www.basedonbirds.com/theclimatehub2
as you can see i really rely on the tags plugin for the development of this site.
I am lost for ideas. Any help would be so much appreciated! Thanks and cheers for the great plugin.
- The topic ‘TDO Tag Plugin and excluding categories’ is closed to new replies.