get_the_category
returns posts only with the default taxonomy “category”, if you are trying to display posts from a custom registered taxonomy you should use get_the_terms
Also get_posts argument category doesn’t support custom taxonomies, you should use WP_Query‘s Taxonomy Query mostly.
Related Posts:
- How to show all posts of the category in wordpress?
- Get category id from post id of a custom post type
- How to show related posts by category or custom post type?
- Structuring a product catalogue in WordPress [closed]
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- How to get the post type from a category id?
- Getting posts under the custom post type ui category
- Show custom post type filtered by category
- Showing posts from different categories and from custom post type
- Add custom post type settings to wordress default posts
- Set a checkmark in a category based on a URL-parameter
- Get the category from custom post type
- Custom Post Slug same as Parents Category Slug
- How can I show 1 featured post in a styled element, and the next few below differently styled
- WP the_posts() on single-cars.php get category link
- Create new custom post and post category of same name
- Custom post types and ‘new WP_Query’
- How to Display Posts From Category Within a Custom Taxonomy?
- Showing custom post type categories in the menu
- Stores category posts in an array
- Restrict category access to specific users/groups. Author always has access
- Post Query not working
- Use post in multiple places on a page with multiple posts
- Am I mixing up the concept of posts pages and categories?
- Display all Categories except ones with a specific parent
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Post category behave like a Post in back office menu
- Save data is post using php front end
- How to show posts of the same category on a page?
- How to manage a dynamic multi-level page hierearchy system?
- Custom Post By Category
- Change Custom Post Type to Post + Category
- Only show current category post
- Post Editor: display categories from current post type taxonomy only?
- Custom Post Type used for FAQs Accordion
- Display all post types together
- show only one category posts in admin
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- WordPress REST Create Post of Custom Type
- Limit the post for differents custom post type in the same wp_query
- Get the post_type of current taxonomy or category page
- Multiple Content Block
- Display Custom Post Type in Recent Posts
- Slug for standard post post_type
- How do I create an archive page for standard posts?
- custom taxonomy archive by year
- Remove parent from custom post type
- Remove All, Published and Trashed Post Views in Custom Post Type
- How to detect filter in URL in Category page?
- How to add post_type=value when editing that post type in the WordPress admin?
- Get posts from a custom post type by child categories of a parent category
- Show a Category X’s custom post type on Category X archive page?
- Filter CPT posts by one or more categories
- WP Query with categories only shows one post and ignores the category
- Hierarchy and access control for Custom Post Types (CPT)
- Loop filtering Custom Post Types and/or Categories
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Categories and tags for custom post types
- Can I change my post type to anything and my site still work?
- How to add current custom taxonomy slug to body class
- Meta data (Tags and Categories) for Custom Posts not showing.
- Custom post types with categories in template
- display posts of custom post type with custom taxonomy
- Different structure/content for posts from a custom post type
- creating files for displaying different custom post type posts with paging
- Category Name with Custom Post Type
- Display author box on just certain category posts?
- How to fetch posts that are stored in the different table than (default) wp_posts?
- CPT archive page – show one post from each taxonomy term
- how to organize my categories or should I do custom post types for some?
- Order Categories by Hierarchy?
- Multiple categories assigned to a single product breaking the breadcrumb
- redirect after submiting post for review
- How to divide Subcategories into pages of parent category wordpress
- i need to have a tab with gategory post
- Custom Post type to Woocommerce Product type
- Auto delete pages/posts without views
- minimize wp_query call to database
- Post display in separate page [duplicate]
- Limit posts per page depending on the size of a div?
- Delete Post by User
- Use Category for Custom Post Type – But Need Another Separate Archive Page too
- Setting up a page to house certain types of posts
- WordPress Contents Migration
- Featured image in custom post is being disabled
- How to set class to “current-page” on the currently viewed single post within a CPT
- How to make post page unique and show it on home page?
- Custom Catagory not found
- Page to show custom posts and one category
- Query Only Show Text on Posts With Certain Taxonomy Tag
- How can I list custom post by custom category?
- Query Posts From Multiple Post Types
- Use only selected regular categories for a Custom post form
- WP Build-In Post selector for CPT
- Bulk remove category from custom post type?
- How do I hide single category post on my post page
- How to change post cpt with submit button?
- Storing every individual update to the posts being updated over time?