Hello here is an example i have used :
<?php while ( have_posts() ) : the_post();
$category = get_the_terms( $id, 'event_category' );
//get First Category
$firstCategory = $category[0];
//get category link
$category_link = get_category_link($firstCategory->term_id);
//echo category name
echo $firstCategory->name;
endwhile;
?>
change event_category with your taxonomy slug
Related Posts:
- How to properly turn off REVISIONS and AUTOSAVE for whole site and optionally for a custom post type only
- Replacing the title in admin list table
- Order by & include array by specific post ids
- How to remove /blog/ prefix for custom post types in permalinks?
- Can I change a custom post type label from a child theme?
- How to model a hierarchy for courses, levels and lessons?
- Customize users’ capabilities to change a custom post’s post status
- wordpress plugin error handling
- The right way to create a custom search page for complex custom post types
- wp_generate_attachment_metadata gives me an empty array
- Custom permalinks
- WordPress 3.1 – How does one add sticky post capabilities to post types
- Delete all the custom post types when deleting user
- Custom Post Type Works but Still Shows “Page Not Found”
- order of date column in custom post type
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- changing default comment form arguments [duplicate]
- Dropdown list of a custom post type
- Is there any performance consideration when using Custom Post Types?
- Change labels of custom post type via child theme
- How to display recent / random posts by its category
- Good way to store content and settings for an RSS plugin
- Exclude specific taxonomy term when using wp_get_post_terms
- Custom Post Type with metaboxes (no content) only?
- Querying Term Posts in Loop
- orderby in custom WP Query does not work
- Getting rid of /my_custom_post_type/ in the single view URL
- Dequeue scripts and styles only for specific custom post type
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Previous/Next Link by Meta Value in CPT
- Restrict custom post type from appearing with ?post_types=
- Shortcode not working with post counter
- URL rewriting for CTP assigned entity
- WordPress posts page for customer filtering and sorting along with category filter
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- Added Custom Post Type and the View Option Doesn’t Work
- How to let users choose where to search for posts?
- how to post default thumbnail if post not created yet
- Option page’s form doesn’t work
- Add arguments to get_the_terms for custom post types
- Saving Meta Data within Custom Post Type
- Redirect to first child on Custom Post Type (without template)
- Creating Sections for Post Types
- WP_Query orderby not work with meta_key
- Can’t delete a custom post in front end with custom role
- Returning a custom content types with meta values
- Strange custom post type issue
- Add custom field to admin area witthout using a metabox
- Can I assign a theme to a custom post type?
- CPT defaults to single.php?
- Meta box data not saving
- WordPress as a frontend website for iOS app [closed]
- Top level menu position overwrites another entry
- Enqueueing TinyMCE
- custom comment fields on CPT
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Custom Post Type Taxonomy Term Order by Title
- Associate Posts with individual user – hide from other members
- CPT to installable Plugin
- wp_query not returning my custom post
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Sorting custom post types in edit.php : Post disappear
- Getting subpage of subpage – Custom posts
- Should i use custom post type for a custom footer?
- best way to use custom taxonomy, post type and meta in a job system
- How to exclude categories from a sidebar with active widgets in it?
- Display the link of a custom taxonomy
- Fetching custom post type without knowing post type (REST API)
- WordPress rewrite rule doesn’t work unless post category is explicitly called in regex
- Create/populate Custom Posts ACF fields from external JSON file
- Error 404 change permalink term custom term taxonomy
- Restrict admin pages for specific user role
- get_posts wont produce a list of custom type from a given category [duplicate]
- Custom attachment function not working in v5.4.2?
- Sort custom post type by custom datepicker instead of filtering
- Help understand and create a loop with WP_query
- PHP Warning with Custom Fields
- How to create editable sections in wordpress?
- How to add independent “Tags” to Custom Post Type?
- Instructor can view, edit, delete only theirs courses
- Custom status and permalinks don’t work?
- filter rest api post by a acf filed
- Shortcode in excerpt
- Show custom taxonomy not in submenu
- WordPress custom post type and page
- Highlight a Post on archive page if it has a new comment?
- Remove parent slugs from URLs on three customs posts types
- Custom post URLs
- I want to show specific parent terms child term with post list
- pre_get_posts not firing at all
- Custom post type rewrite with_front
- How to use wp query posts with current post meta value in text widget
- Why are my wp urls showing page not found?
- How do I display the index position of a post from a custom post type?
- Custom posts and custom taxonomies for many products and categories?
- How to retreive terms associated with a custom post type?
- Using tax_query to get single post per category
- Create taxonomy from Custom Post Type
- How to “Custom Post Type” as a non-programmer?
- Is there a function that replace category name with a icon?