use get_the_category()
<?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?>
Note: It will return a list of categories if there are more than one category
Related Posts:
- Different excerpt styles per category, but chronological
- Can I set a default featured image for a category?
- How can I add the featured image functionality to a custom taxonomy?
- How can I make post fields required in WordPress?
- How to add a background image to category and display image on category page
- Display the featured image from the last post
- Display child categories in WooCommerce
- How to make a Thumbnails Mosaic
- Category index featured image
- Display thumbnails for certain category posts
- Random Featured Image Based on Category
- Category images are not displaying in WordPress
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Category view with contents of [gallery]s shown
- Random category with recent post title and thumbnail
- How to add icon over specific thumb
- Display post thumbnail for specific category outside the loop
- How to add image for all posts associated to specified category?
- How to display WooCommerce category image in my category page banner as a background?
- How to make product image inherit from category image
- show thumbnail for subcategory wordpress
- How to add excerpt and read more button to category archive page
- How to hide/remove featured images in particular categories post?
- Custom field picture instead of post thumbnail on category page
- Display last postings of 5 categories on homepage
- How to enable admins/editors to set a featured image for specific category?
- WordPress excerpt for specific posts in category
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- Featured image for links and categories
- Show thumbnails 1-12 of category x on any given page
- How to display the category featured images [closed]
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- Change Category Base For Custom Post Type or Posts Page
- Category name as page title
- Is there a way to order categories?
- Confused about category.php template – not working
- How to test if the post is in a primary category
- How to hook into creating a category?
- Pagination does not work with query_posts()
- Categorizing Just Imported Posts
- Bulk Change WordPress category Slug
- Hiding by default posts in given category except for some cases
- Default URL for category dropdown select option
- Post url rewriting for posts with certain category
- How to get the term id inside the start lvl method of category walker?
- How to use categories, sub-categories and customize navigation view
- Hide empty category on woocommerce
- Media Library Category Exclude Tree
- Media Library Categories
- Hide post category name wherever it might be mentioned
- Multiple if statements with else for get_the_category [closed]
- When category name and title are the same … WP will select archive.php instead of single.php
- Exclude category from WP_Query args not working
- How to apply wordpress ‘with_front’ = false for categories?
- Custom Category Archive Pages
- Add subcategories posts to the counts column at the admin’s categories list
- Re-coding category-template.php to go to custom URL
- Category removal – Portfolio Category:
- Assign a class to first element in category in loop
- Balance Tags to the_content Words Length
- How to create template for children category?
- Filter custom taxonomy posts via AJAX
- set a parent category in a product woocommerce
- restrict category to only logged in User
- “Next posts” of a category do not call category.php
- Category and tag urls return 404 error
- No results found for second level category
- Categories Help and video uploads
- get_the_category vs wp_get_post_categories
- Displaying Category in sidebar post widget but not in the loop on home
- How to display products with multiple conditions, product_id and category_id
- Create duplicate category page with content variations
- Why use hierarchical taxonomies instead of many custom taxonomies?
- Breadcrumbs and Categories
- Renaming default category taxonomy?
- Conditional Site Logo(Category Based)
- custom browse by
- Profiling user with categories
- Search by tag, category and author without plugin
- Images appear in the header on all pages, but not category.php
- Style a category page the same way as the homepage?
- List only child categories a post is in, of a specific parent category in wordpress
- show only terms from parent category
- Ajax Response Error
- Making my category headers smaller
- show posts in archive page based on selected catagory
- Need help to structure our a complex hierarchy
- Adding a category view to a page
- global categories – Share specific categories in wordpress multisite
- WordPress update 4.7 – the 70.000+ news posts became “Uncategorized”
- Most efficient way to display current post subcategories?
- How to display child-category PAGES on a category page
- How get all media from a posts category by db?
- Cant get unique_array() work on get_the_category() foreach loop
- WordPress pagination based on category
- Using a template page parent breaks page
- Issue with WordPress category search
- Different template for subcategories
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- WordPress Category url redirects to subdomain