• Hi,
    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: https://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’);
    $args=array(
    ‘category__in’ => array($current_cat),
    ‘paged’ => $paged
    );
    query_posts($args);

    However when i try to use this function, it breaks the ‘TDO Tags’ plugin.

    The website i am developing this for is here: https://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.

    Simon

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘TDO Tag Plugin and excluding categories’ is closed to new replies.