stripping out categories
I’ve been combing through various methods for displaying the category within a single post as a footer. However, I am using categories to control various custom loops and I want to eliminate one particular category from display in the footer.
I am currently just using the_category() within the single.php page, but I have also experimented with wp_list_categories(), as it offers the ‘exclude’ $arg. However, this displays a list of ALL categories, rather than those that are associated with this PARTICULAR post. I’m not strong enough of a PHP coder to limit the return within wp_list_categories() without tying knots with a bunch of conditionals like in_category() and is_category().
The default function of the_category() is perfectly suitable for me, (i.e. links and standard delimiters) but I want to strip out just ONE specific category, as it is only used to manage multiple loops and I don’t want it displayed with the rest of the categories.
Just wondering if anyone has run into anything like this. Thanks a bunch.
- The topic ‘stripping out categories’ is closed to new replies.