I’m not sure what you mean by ‘first’ taxonomy… but,
$terms = get_the_terms( $post->ID, 'mytaxonomy' );
returns an array of taxonomy term objects, so
$term = array_pop($terms);
Would give you the first term in the array. And then:
echo '<a href="'.get_term_link($term->slug, 'mytaxonomy').'">'.$term->name.'</a>,'
(You may want to include some if statements, in case an empty array or error is returned (see is_wp_error)
Related Posts:
- How to change permalink structure for custom post type and it’s taxonomies?
- Creating “static” taxonomies to choose from, inside custom post type?
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How to list all categories and tags in a page?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- How can you make permalink work for custom post type and taxonomy?
- How to get a list of term names of the custom post type im currently on in single.php
- List all custom post type posts from a given category?
- Custom post type taxonomy template
- get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category
- Category page only displaying the posts from a custom type
- Show Post Count of a Category
- Custom Post Types and Categories?
- How to create new category for custom post type?
- Get Post Primary Category
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- How to get the post type from a category id?
- How to show CPTs in term archive
- Display all posts in main category and 1 subcategory
- Show category ID on custom post type
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Limit amount of posts made within a custom taxonomy
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Categories and tags for custom post types
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- Invalid Taxonomy
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- Get assigned post categories
- Default Category Page not showing custom post type which has taxonomy category
- Categories won’t appear on custom post type
- Custom Post Type with modified permalink structure results in 404
- Custom post type, taxonomy and admin bar
- Displaying taxonomies as category links within sidebar and creating pages for these
- Custom post type archive page filters
- How to show related posts of category on post within custom posttype
- get taxonomies from terms
- Create custom post type categories
- Set a Default CPT taxonomy by taxonomy id
- how to create custom taxonomy drop downs for parents and child
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- I can not call the categories of custom post type
- Reuse the “category” slug for a custom post type
- How to create groups like that in buddypress?
- Update Cateogory Taxonomy Count for Attachment Post Type
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- category_name not working in WP_Query
- How can I set up the URL for a category archive for a custom post type?
- Custom Post Type order Title ASC
- show only one category posts in admin
- Is it possible for post and custom post type to share a category base slug?
- Add taxonomy or category slug to custom post types URL
- How to determ a custom post type url?
- Use the_taxonomies() to create a simple list
- Query Custom Post Types & category_name?
- How do I get the child category posts from a custom post type?
- Return array of categories to php function for current post
- Hierarchical Custom Post Types – Show only parent on tax archive?
- How do I do this with WordPress? Taxonomies?
- wp_list_categories() – current-cat class also inside posts?
- list taxonomies from a custom post type
- Set a CPT slug as a base name for all the taxonomies
- Taxonomies relations
- Post injections into Site Origins Page builder [closed]
- Full Custom Post Type List Organised by two Taxonomies
- Not sure if I should create multiple custom post type [closed]
- Adding custom taxonomy in same menu place with two custom post types
- Multiple pages for posts?
- How to assign tag to custom post type in wordpress?
- Use the custom post type archive for taxonomies?
- Custom Post Type Categories URL not displaying posts
- WP Query results showing posts outside of category ID
- Taxonomy template page not working
- Running a custom query inside another cpt single and trying to grab a variable
- Get posts by category name
- List child categories from parent category on custom taxonomy page
- Can’t Get Parent and Child Categories of Custom Taxonomy to Display
- Query all posts under one taxonomy? Why is my code not working?
- CPT archive with WP native/core tax/categories
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Category permalinks don’t work even after flushing
- Change custom post taxonomy values from front-end
- Pages of my taxonomy terms are showing all posts
- Modify the category post counting function
- Custom post types not displaying per category
- How To Display Category list from Portfolio post type plugin?
- Custom Post Type – Admin Columns
- Displaying taxonomy icon outside archive page
- Categories in custom post types
- List a custom post type’s posts ordered by nested custom taxonomy
- Sorting custom post types by category?
- Get all custom_post_type posts + blog posts from one category in a single query
- Select Category as Page Parent
- How do I get parameters from the URL?