You could do it like this:
<?php
$exclude = array( 'home-featured' );
foreach( get_the_category() as $category ) {
if ( ! in_array( $category->cat_name, $exclude )
echo $category->cat_name . ' ';
}
?>
Related Posts:
- Get all categories and posts in those categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Test if post has a category
- Make parent categories not selectable
- Reflect nested categories in appearance > menus
- I want to order categories based upon the latest post time
- How to find all posts without category and assign the “Uncategorized”?
- How to show posts of an columnized different categories on the same line or row?
- Echo one category as title when post has multiple categories?
- How to Override default update_count_callback for category
- I use same slug name for category and page
- WordPress previous_post_link exclude posts with multiple categories
- Is it possible to put tags and category information in the post as text?
- On Category page, How can I get the category ID?
- Order Taxonomy Term by date created
- How do I display the posts from a custom post type on a category.php page?
- Let visitors post comments on category page
- category_description() shows raw html after version 3.x?
- Is it possible to post with Word 2007 via XML-RPC and limit categories by user?
- how to get the categories for a single post in a hierarchical way
- Make parent category not selectable when it has child categories
- Can I use get_adjacent_post for specific categories?
- How to Filter categories in the permalink structure
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- How to display posts under a specific subcategory of a given category
- Is there a cleaner way to get post count for a category in category.php?
- products nested by subcategories in a current category archive
- get_the_category() always returns empty array
- Post count for category and tag
- Get current_parent_category in a loop or Cat ancestor- big problem
- Show number of articles in menu
- Can you pre-check wordpress categories?
- If posts category is “cars”, display image
- Is having thousands of unique categories a concern?
- How to prevent parent being choosen in wp_dropdown_categories
- query in category.php repeats itself
- How can I add more “filters” to my products? (Categories, attributes, etc.)
- Remove product category placeholder image (Woocomerce)
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- How to build a simple nav system of custom post type categories and its posts?
- Style category link depending on category ID
- Custom Walker for wp_list_categories
- How to insert category list into post creation page, and retrieve chosen categories?
- Output category color option to each li item
- How do I display only two categories Instead of displaying all categories
- Hooking to walker_nav_menu_start_el to insert list of subpages
- scaleability of tags
- Show the latest post from child category?
- Having problems with paging
- How do I add a tag slug to a category URL to filter posts?
- Dropdown menu for subcategories
- How to add categories on a page [duplicate]
- Adding custom ID field to the categories
- Getting Category Children
- Child Category Conditional Question
- Getting the first parent of a hierarchical term
- Break down output of wp_list_categories
- Get the ID of the current post’s child category
- get category name in admin screen
- Return category posts with WP_Query
- Include either name or slug in the include parameter using wp_list_categories?
- get cat id is not working from custom taxonomy
- How to add image for all posts associated to specified category?
- Show the current post’s category, without displaying parent category
- Include specific category in URL automatically
- WordPress Category Page Layout
- get_the_category – display only a single category for a post (not all categories)
- display category with background color
- WooCommerce Product category can be shown with multiple related URLs
- It is possible to display related posts from same category as the current post?
- Categories are not available AT ALL under Menus
- change image on single product page with js
- How to get all post categories without custom post type categories?
- Displaying a Category on a WordPress Page
- Show alternative menu based on page template AND post category
- Hide specific category link from showing
- Display Category yearly wise in wp
- Get all subcategories IDs from categorie or categorieIDs
- Redirect category archives to pages
- How to create a category loop on my blog (ACF Plugin)
- Using heirarchial tags or Custom taxonomies
- Get posts base on category ratio of more then two categories
- Images appear in the header on all pages, but not category.php
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- Change single.php template based on parent category
- WordPress and “pretty permalink”
- New Category – custom taxonomy
- add custom option to get_categories dropdown
- Category as subdomain
- WordPress category gives 404 after moving to a different domain
- Create custom Perma link
- How to load/include category templates based on conditionals?
- Why does WordPress append a bullet to my category tag?
- how to implement next/prev within category archive?
- Add product category to post_class
- Moving Blog and Changing URL
- completely confused with archive.php, category.php
- how do I exclude a category foreach
- CPT Custom post type Tags & Categories not showing for ‘Editor’ user in editor