have you tried something like,
$post_categories = wp_get_post_categories( $post -> ID );
foreach($post_categories as $c){
$cat = get_category( $c );
if ( $cat->slug != "cat" ) {
echo "$cat->name";
};
}
Related Posts:
- Get Posts Under Custom Taxonomy
- How to get the number of posts in a selected category?
- Different number of posts in each category
- Getting Position of a post in a category
- Display only posts from a specific parent category
- get_the_term_list by hierarchy order
- How to change the layout and styling of posts according to their category in WordPress?
- display sub categories assoccited with each post in a category archive page
- How can I specify a category post on my home page
- Use template of parent category for single post sub-categories
- How to search only by post title and category?
- Add custom field to category of custom post type
- Permalink Settings: optional settings doesn’t apply to editor
- WordPress – Admin Manage Posts – Multiple Filters by Parent Category
- Custom Theme Want To Remove One Category From All Displays
- Divide Loop Into Days & Categories
- Different template for posts of all subcategories of category
- I want to show category in the post title , how can I do
- Mark menu item as current-menu-item for category
- Random post category URL
- How to set up multiple taxonomies for groups of posts
- How can i sort the categories by ID
- Display posts in three columns by category
- Add ajax load more function using WP API
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- Properly display posts on homepage
- Display post X of Y in category
- Duplicate posts and change category
- Category Foreach keeps looping?
- Exclude category from
- Post page to display specific category
- WordPress Multisite – Create Default Post and New Category On New Site Install
- how to show single post in a custom template
- Using ajax on editing a category edit page?
- Disable sticky option for specific categories
- date issue with category post retrival
- How to make multiple sections in home pulling posts category wise?
- Limit the number of posts a category can have – newest post goes in, oldest one drops out, possible? plugin?
- How to get subcategories from category slug?
- Remove current category from post but display all others
- Showing categories and subcategories with posts
- Change default category when I publish a post
- Loop doesn’t exclude the specified category in home page
- Post Image not displaying in category view
- How do I include the category next to the title of a post?
- Parent category / child category posts
- Posts Missing in Dashboard after update
- Display post number by category
- Unable to differentiate between two categories under custom post type on single.php
- Exclude post category in a blog page
- Retrieving posts by their date and category
- Are post, page and category IDs unique to each other?
- Static pages not working
- WP_Query of Category Not Showing First Post
- How to make posts being uncategorized
- How to display a single(current) post from a category
- displaying the categories post
- What’s a theme that properly handles previews of different types of posts?
- How to add content above footer in posts from specific category
- Display hierarchical categories/sub-categories for a single post only
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- Author post count in category
- How to Create another Page Category like the “Post” and “Pages”
- How to create a button to filter posts (list) by meta value
- Why do I have categories with duplicate slugs?
- Is there a way to save different data when USER interacts with the same POST?
- How to display particular categorie’s post which associated to specific user?
- Display Specific Categories posts on the home page
- show only one category and filter by tag
- Automatic Table of contents with categories and posts
- Code to display random ordered posts in Categories across pages [duplicate]
- AJAX load more posts not using correct category and repeating the same few posts
- Category posts show on local install, they do not show on live server
- How can I exclude only a specific sub category post from category display?
- how to print total number of posts filtered by category?
- Need help with hiding an image within a post in a category
- WordPress not showing recent posts
- How to filter out post from a category not its subcategory in wordpress dashboard
- Add category information beneath post?
- How can I display a specific number of post in a category via a url
- how to chang preview of list of articles of one category?
- Newly created category does not show category
- Post of a specific category – not to be seen in paging previous/next post
- How to show main category related to that post
- Display selected category on post page
- How to pass multiple checkbox values to wordpress query?
- Sort post by category using HTML Select tag
- Make assigning post to a specific category equivalent to assigning it to all categories
- Show a Category Specific Info Box
- How to use in_category?
- Display the first post’s comments of category in comments.php template
- List posts that are in the same category as the current post title
- Category page shows “No Posts” but I do have two assigned
- Exclude a ‘portfolio’ custom category?
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- excerpt in template for specific page
- Only show posts belonging to multiple cateogries at same time
- Wrap posts from a category in HTML
- How can I get on the same row two post of different categories?
- Filters do not work when there are multiple (one works)