Home › Forums › Support › Exclude Term in Category Archive This topic has 7 replies, 2 voices, and was last updated 3 years, 5 months ago by David. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts November 17, 2022 at 5:41 am #2419471 Anonymous Hello to the US, I need your help again. I would like to exclude a category/term in the category archive. Is it possible to do this via a CSS instruction. So example categories are: Sports Business Germany headlines The archive shows the terms: headlines, sports Germany, headlines The Headlines category should not appear in the Headlines category archive in terms. Do you have a solution for this problem? Greetings from Munich Uwe November 17, 2022 at 6:52 am #2419569 DavidStaff Customer Support Hi there, try adding this PHP Snippet to your site: add_action('wp_head', function(){ if ( is_category() ) { $tax = $wp_query->get_queried_object(); $slug = $tax->name; echo '<style>.post-term-item.term-'.$slug.' {display: none;}'; } }); November 17, 2022 at 7:14 am #2419606 Anonymous Hi David, Thank you for your prompt reply. Unfortunately, I’m not a PHP professional … where do I have to enter “headlines” in the code so that this term is excluded. Greetings November 17, 2022 at 7:21 am #2419617 DavidStaff Customer Support That code will remove the Current Taxonomy term from the List of Terms. So it applies to all terms eg. if you went to the Sports Category Archive, it will hide the Sports term. Did you only want to remove headlines for the headline archive ? Sorry, i should have provided this doc, which explains: https://docs.generatepress.com/article/adding-php/ November 17, 2022 at 7:29 am #2419646 Anonymous Yes, I will only want to remove headlines for the headline archive ? November 17, 2022 at 8:22 am #2420045 DavidStaff Customer Support Ok, try adding this CSS instead: .category-schlagzeilen .term-schlagzeilen { display: none; } November 17, 2022 at 8:42 am #2420074 Anonymous Hi David, Wonderful… it fits! Have a nice day… 🙂 Greetings from Munich November 18, 2022 at 4:50 am #2421253 DavidStaff Customer Support Glad to be of help! Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In