that’s the way,
aha aha,
and I like it,
aha aha…
<?php // Get terms for post
$terms = get_the_terms( $post->ID , 'oil' );
// Loop over each item since it's an array
if ( $terms != null ){
foreach( $terms as $term ) {
// Print the name method from $term which is an OBJECT
print $term->slug ;
// Get rid of the other data stored in the object, since it's not needed
unset($term);
} } ?>
Related Posts:
- Displaying custom taxonomy in the admin list of a custom post type
- Exclude Custom Post Type from shared Custom Taxonomy
- get_terms by custom post type
- single-{$post_type}-{slug}.php for custom post types
- Row actions for custom post types?
- Get terms by taxonomy AND post_type
- remove custom post type permalink
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Get The Post Type A Taxonomy Is Attached To
- Filter by custom field in custom post type on admin page
- How can I remove the “Add New” button in my custom post type?
- Media library – Limit images to custom post type
- Display current taxonomy term when inside custom post type
- Sort search results by post type
- Get term slug of current post
- How to order posts of a custom post type by date DESC in dashboard Admin?
- How to remove Filters from post admin page?
- Custom sortable columns ordered by meta-value?
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Adding a drag and drop re-ordering from a custom post type default list [closed]
- How to limit the number of terms (terms acts like categories)
- How can I filter posts by post_parent in the admin?
- How do I filter the excerpt metabox description in admin?
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- How do I list custom taxonomy terms without the links?
- Filter for “get_post_type_archive_link()”
- query multiple taxonomies
- How to correctly get post type in a the_title filter
- wp_set_object_terms() is not replacing term, but creating a new one
- How to add a CSS class to every image in a Custom Post Type
- Get terms that contain posts that in turn belong to other terms?
- Best way to filter featured image text for a custom post type?
- How can I get next/ previous post links to order by a filter (by the last word of the title)?
- wp_insert_term doesn’t work with custom post type’s taxonomy
- show tags of custom post type ONLY
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- How to get term link that crosses different custom post types?
- wp_get_object_terms(): count relative to passed IDs?
- Count posts that have specific taxonomy term attached
- Filter by custom Field for Custom post type Admin Listing
- Retrieve single term slug
- Most efficient way to search for values from CPT in Post content
- WP Admin default view mode for Custom Post Type
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- array_pop() expects array, boolean given for $event_type_term ->slug
- post_type_link filter causes 404 on the CPT page it’s used on
- Remove wpautop from all posts/pages except my custom post type
- How can I add programmatically custom taxonomy terms to a custom type post when saving posts?
- Remove date and category filters when editing custom post types
- post count is wrong when using same taxonomy for 2 different CPT
- Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts
- How to hook get_terms() to only show count of posts that have custom meta
- display multiple term post from taxonomy in a single page
- Make the ‘all’ filter default instead of ‘mine’ in a custom post type
- Glossary with Custom Post Type
- Exclude custom function content from certain pages
- Title_save_pre – Simple problem that u know for sure
- Custom Post Type Archive Template
- Filter get_categories() for taxonomy term in WordPress
- Debug output during filter execution doesn’t work
- Maintaining strict one-to-one association between terms and custom posts
- Displaying custom post type by first letter through custom taxonomy
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- If on term-page -> get the current term?
- Ajax filter with custom taxonomies
- Filter posts with ajax form and checkboxes
- Separate Custom Post Type Taxonomy by Comma
- Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy
- Multiple post types in archives (filter?)
- Image size filtering in Media uploader according to custom post type
- How to remove CPT comment feed from head?
- Custom Search | Wrong output & question
- Sort the main query in subcategories/terms?
- Unable to filter on field on edit.php page
- Trouble adding custom featured image for custom taxonomy TERMS
- Get child terms of current term of the current post
- wp_query and comment_parent – select only posts with top level comments
- Highlight nav menu terms
- Help with issues on “Adding a Taxonomy Filter to Admin List for a Custom Post Type?”
- Want to filter only parent post in admin area
- Adding posts of custom type into the main feed
- Used with meta_query in query_posts works slowly
- Get list of terms of current taxonomy archive for another taxonomy
- Hooking into wp_export filter for custom post type [closed]
- List all custom post type posts from a given category?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Custom Post Row Actions
- Output the slug and name of a CPT single post taxonomy term
- Filters post in admin with dropdown select, custom post type
- Get all taxonomies for all post types
- Get the terms of a custom taxonomy for a specific author in author template
- Admin List Dynamic Heading
- What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience
- How can I add a column in the wp_list_table of the admin area?
- Archive filter disappears on no results?
- How to filter the description of a custom post type
- Dynamically create/remove terms in taxonomy when custom post type is published/trashed
- get_terms won’t display product_cat or any other custom taxonomies when specified
- Remove “Get Shortlink” button in admin of custom post type