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
- How to add category to: ‘wp-admin/post-new.php’?
- Setting Custom Sort Order of Posts within a Category
- How to show list of posts by author and category?
- Change the Slug of Post Type post to baseurl/post/%postname%
- Create terms when registering taxonomy?
- Change slug with custom field
- Add default content to post (for specific category)
- Display most recent post in category instead of archive?
- Display taxonomy term only if there’s a value
- Display empty taxonomy terms with get_terms()
- get_post_type_archive_link(‘post’) returns current category archive
- Permalink Settings: optional settings doesn’t apply to editor
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- I want to show category in the post title , how can I do
- Random post category URL
- How can i sort the categories by ID
- Add ajax load more function using WP API
- Automatically Updating Publish Date Bug
- Properly display posts on homepage
- Display post X of Y in category
- Exclude category from
- Display tag image in post using Taxonomy Images plugin index.php
- Help with Taxonomies
- Custom Post Slug same as Parents Category Slug
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Using ajax on editing a category edit page?
- Saving custom fields to a custom taxonomy
- How to get subcategories from category slug?
- Loop doesn’t exclude the specified category in home page
- Post Image not displaying in category view
- relating business and products with custom taxonomy?
- Parent category / child category posts
- displaying the categories post
- What’s a theme that properly handles previews of different types of posts?
- Custom post type and taxonomy page templates
- How to add content above footer in posts from specific category
- WordPress – When visiting a `single post/ single.php` my category menu item link becomes active
- Get post slug and match with menu item slug to change css
- Define multiple prefixes for custom post type
- How to show category list in WordPress
- How to create a button to filter posts (list) by meta value
- Is there a way to save different data when USER interacts with the same POST?
- How to display particular categorie’s post which associated to specific user?
- Display Specific Categories posts on the home page
- show only one category and filter by tag
- Code to display random ordered posts in Categories across pages [duplicate]
- If taxonomy has more than 6 posts, display show all
- AJAX load more posts not using correct category and repeating the same few posts
- How can I exclude only a specific sub category post from category display?
- how to print total number of posts filtered by category?
- Add category information beneath post?
- Post as frontpage – avoid duplicate content
- How to list all names and descriptions of a custom taxonomy
- Newly created category does not show category
- Special Query: Title, Terms, Content – %LIKE%
- wordpress show category link instead of post link [closed]
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- How to display my categories in a list (to a post, not the sidebar)?