$category_detail=get_the_category(get_the_ID());//$post->ID
foreach($category_detail as $cd)
{
$name_category=$cd->cat_name;
$id_category=$cd->term_id;
echo $name_category;
}
this code get category name and id you just put a post id
Related Posts:
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom Taxonomy as Dropdown in admin
- Custom taxonomy not showing up when adding a new custom post type
- How to list all categories and tags in a page?
- Retrieve single term slug
- Create an archive page for custom taxonomies
- Query multiple taxonomy in Custom Post Type
- How do I list terms of a custom taxonomy at i.e. domain.com/brands/
- Custom Post Type: How to display all of same taxonomy?
- Taxonomy-{taxnonomy}.php is not working
- Remove “-2” from a Toolset Types URL with the same post name
- Get list of terms of current taxonomy archive for another taxonomy
- Associate Taxonomies Across Post Types
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Custom Post Type and Taxonomy combination
- Show Post Count of a Category
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Relationship between two taxonomies and a custom post type [closed]
- Menu Multiple Taxonomies
- How to make a custom taxonomy selectable in post publish area?
- How to check the terms in single custom post type template
- How can I move a custom taxonomy and its data from one post type to another?
- Custom page template for category taxonomy
- How do I get array of types associated with a taxonomy?
- Display all posts in main category and 1 subcategory
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- Custom Taxonomies not appearing in Admin
- How to display custom taxonomies with links in filter menu?
- How to Filter custom post type by taxonomy?
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- How do I display the grand child items of a taxonomy term?
- Taxonomies relations
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- Adding custom taxonomy in same menu place with two custom post types
- Rename a slug label
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- Custom taxonomy (categories) on custom post type return no results
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- Rewrite custom post type with taxonomy
- WordPress multisite – is it possible to have different taxonomies for each site?
- My custom taxonomy is only displaying 1 of 3 terms
- How to show list of taxonomy terms associated with specific post?
- Changing CPT slug and taxonomy already registered in parent theme
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Custom Taxonomy Terms in Menu lead to which page?
- Getting List of child terms from custom taxonomy parent
- Custom taxonomy query showing more than 4 posts
- Using page title as a link to term archive
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- How to get post count of specific taxonomy that have store name & category
- Duplicate slug/permalink issue while adding same post name
- Get the taxonomy value in the post loop inside the archive page
- How to show related posts of category on post within custom posttype
- Custom taxonomy returns 404 even with saving permalinks
- Create custom post type categories
- How to add CSS class field in Custom Taxonomy?
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Set a Default CPT taxonomy by taxonomy id
- Get all posts for custom taxonomy term
- Listing all custom posts having a specific taxonomy whatever the terms
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- Display custom tax in “while” loop
- Categories manage
- Add other all taxonomies as meta boxes to custom post type
- Custom post type category link + add to menu
- Showing taxonomies with terms that are attached to custom post
- Custom Taxonomy page redirecting to 404 page
- Changing an item in drop down after 5 latest posts per taxonomy
- Filter Term By Parent Term – Custom Post Type
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- Best approach to allow front-end display of posts’ reviewers?
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- List all posts from custom post type by taxonomy
- Connecting multiple post types? Or linking “News” posts with “Game” posts how?
- Sort by Custom Post Type (Multiple Loop)
- Archive templates based on taxonomies
- How to display elements of different post types?
- How to display only taxonomies of custom post type in a page?
- Check if taxonomy is attached to at least one post in a post-type
- Looping taxonomy in taxonomy?
- Custom posts and custom taxonomies for many products and categories?
- get_the_term_list() wanting to loop through the returned values
- How do i get the taxonomy term name on the CPT archive page?
- Get all active posts that are tied to a custom taxonomy for a custom post type
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- Is it possible for post and custom post type to share a category base slug?