Try using get_the_terms()
instead of get_the_category()
. The latter is for the default “category” taxonomy only, not custom taxonomies you register yourself. See developer.wordpress.org/reference/functions/get_the_terms
Related Posts:
- Get Posts Under Custom Taxonomy
- How do I get the slug of a custom taxonomy category of a post?
- How to set up multiple taxonomies for groups of posts
- Get Posts Under Custom Taxonomy
- Display posts of specific category term
- How to get post count including nested categories
- Different post sort order within different categories
- How to add metabox for post of specific category
- Manipulate post category after time
- Categories box not showing on post edit pages
- List only child categories a post is in, of a specific parent category
- Add custom field to all posts in specific category
- Exclude category on blog list page
- is there a better way of combining this?
- wp_list_categories link to first post of category instead of calling taxonomy template
- WordPress Child Category Display All Posts
- How to Add ‘Post Categories’ to the Dashboard Sidebar
- How only display all post related to category
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- Add category to all post by using sql query?
- Full Width Main Post
- How to automatically apply a category based on the post title?
- Direct link to “New post” in specific category?
- How do I retrieve then print the currently viewed sub categories?
- Pulling in post category and children within category
- Post categories to pages
- How to render taxonomy in loop of custom post_type
- WP_Query: Mixing category__in and tag__in together
- If in_category not working for multiple single.php pages
- Related posts by category not working right
- Set Default Category to Username
- How to add tags (custom taxonomy) to post class css?
- Listing Specific Categories from Current Post with Depth
- Display post category in foreach loop
- Single.php – Get Current Parent Category
- get_the_category listing in hierarchial order
- How show categories in admin and get that selected to show posts in index
- Displaying posts that belong to a specific author
- Get posts and include taxonomy term
- How to Display Posts From Category Within a Custom Taxonomy?
- Give posts a particular template based on the assigned category
- Show posts on front page only
- Post-Archive like a page in a specific subdirectory
- Post is in descendant category not working in home.php
- How to get posts ordered by using their categories?
- Hide parts of the post content after typing it’s name or searching it by category
- SQL Bulk Move old posts by one author to another category
- How to display only one category in a custom post type?
- load more posts by category
- Get only X number of categories
- Display Related Posts by Category in Random
- inserting a category into post
- Getting posts from some categories plus some individual posts
- Change layout of post depending on category
- How to show beneath posts the full category path?
- latest post showing up twice on posts page
- wp_list_categories() Exclude All Categories Except One
- Display Current Posts Category (with the most posts)?
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Display default matabox of posts(add category) wordpress
- ACF date picker to trigger category change
- Get category slug of the Parent category of a Product
- How to get tags when using publish_post
- Query to fetch custom taxonomy along with post title
- exclude particular category in api
- How do you change the permalink for posts for a single category?
- Make categories appear random
- Exclude posts in a category on one page but show those posts on a different page
- How to manage a dynamic multi-level page hierearchy system?
- Excluding category from post navigation in WordPress?
- How to make a page show posts only from specific categories without editing php files
- Get posts from category from custom query
- How to show posts ordered by random [duplicate]
- How to Get Position of a Post from a category and tag
- Display new posts categories in separated divs
- Querying posts from current category, using a variable as array argument
- Add Categories To Custom Post
- Query posts from newest category
- Precedence of page permalinks over woocommerce product category links?
- Display Posts by Categories
- Ajax – Post Categories and Load More
- Need help writing loop to display posts by categories in separate divs
- Edit Posts Page but not category specific pages?
- Add category selection to function request
- Multiple Post Repeat for Related Post Loop by Category
- Show Post number of specific Category
- How to organise post by category and date
- Show post if in category
- How to display custom content in post with category XXX
- Displaying categories items among posts
- how to show posts on different pages if number of post per page is one
- Displaying different posts Via wp_list_categories()
- Is it possible to have different header style blog titles in different categories?
- Category pages vs single post pages
- Display ONLY Latest Post From Several Categories
- How do we display a certain category type on a page while hiding all others?
- Show all posts in category
- Polylang – display one post into 3 categories with different lang [closed]
- Export Posts Without Categories In An XML File
- Site ‘Categories’: save an admin global setting with post metadata [closed]