This shouldn’t be too hard!
$my_terms = get_the_terms( $post->ID, 'portfolio' );
if( $my_terms && !is_wp_error( $my_terms ) ) {
foreach( $my_terms as $term ) {
echo $term->slug;
}
}
Related Posts:
- Get Posts Under Custom Taxonomy
- Get Posts Under Custom Taxonomy
- How to get post count including nested categories
- Use category base slug in posts’ permalink
- Different post sort order within different categories
- Displaying the category name of a custom post type
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- How to control which category will be picked for the slug of a post?
- How to create non-unique sub-category slugs?
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- Adding Multiple Values to a Post Meta Key
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- How to set up multiple taxonomies for groups of posts
- Get posts by name and taxonomy term
- Display Taxonomy Terms in an option tag with value being the slug
- Choose whether to automatically add a taxonomy with the same name as the post
- Posts list in custom taxonomy
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Prepending %category% onto default posts fails
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- How can I setup a relationship using categories in WordPress?
- How can I hide tags on a child-category page, if that tag has not been used?
- Redirect to another page using contact form 7? [closed]
- Display posts of specific category term
- WordPress bulk category select when publishing post
- How to show a custom taxonomy in the theme?
- Unable to differentiate between two categories under custom post type on single.php
- Geting error in post and category [closed]
- How to associate a custom taxonomy to a post multiple times
- How to 301 redirect from url with post id to permalink with post name (slug)?
- Create/Set Category as Title of Post
- How to manage a dynamic multi-level page hierearchy system?
- Page with Category Returning 1
- Slug collision between page, taxonomy and custom post type
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Custom Taxonomy From Database
- Multiple loops on a Search result page?
- retrieve post slug by post_tags taxonomy
- Show all posts in category
- Taxonomy Category category.php not working
- Show category name in category.php when posts assigned to multiple categories
- How to display related posts from same category?
- Where is the old post permalink slug stored?
- How to show related posts by category
- How to add category to: ‘wp-admin/post-new.php’?
- Including categories in search results
- get_categories for custom post type with a specific custom taxonomy attached
- Custom Post Types, slug, archive and SEO plugins
- Count how many posts in category
- Custom Single Post By Category
- Setting Custom Sort Order of Posts within a Category
- How can I add the featured image functionality to a custom taxonomy?
- How to get the number of posts in a selected category?
- MySQL Query to Retrieve Category from wp_posts
- Different number of posts in each category
- Elegant way to include only published posts with get_objects_in_term()?
- Combine two taxonomies in a hierarchical tree
- Display all posts from specific categories on a page
- How to automatically generate a unique random slug
- Display the latest post from a category in a page
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Post slugs and images cannot have same name?
- How to show list of posts by author and category?
- Exclude specific slug in ‘get_terms’
- Change the Slug of Post Type post to baseurl/post/%postname%
- Category checkbox list tree changes when editing a post
- How to add metabox for post of specific category
- Convert custom fields to post categories
- How to list all categories and tags in a page?
- How can I select a primary category?
- How are terms connected with posts in database?
- Manipulate post category after time
- Show related posts by category but ignore one category
- How to sort posts by last name (2nd word) on ONE category only?
- How to disable Uncategorized category URL?
- Add role that restricts user to post in specific category
- How to get Category Id from Post Id ?
- Count posts in category including child categories
- Query posts from current year
- How to make custom taxonomy check boxes like ‘Categories’
- Getting Position of a post in a category
- Display only posts from a specific parent category
- Create terms when registering taxonomy?
- Categories box not showing on post edit pages
- Change slug with custom field
- get_the_term_list by hierarchy order
- How to change the layout and styling of posts according to their category in WordPress?
- Convert IPTC keywords to blog post tags
- Determining Slug Before and After Edit
- How to get next previous category in same taxonomy?
- List only child categories a post is in, of a specific parent category
- Add default content to post (for specific category)
- Create new category upon save based on post information
- Query only Posts from Both of Two Category?
- Add custom field to all posts in specific category
- Exclude category on blog list page
- meta_box or custom_field as a second tinymce post-instance?
- Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms
- display sub categories assoccited with each post in a category archive page