you can use the get_the_terms()
function to get the terms of that post in a specific taxonomy:
$terms = get_the_terms( $post->ID , 'speaker' ); //change speaker to whatever you call your taxonomy
//then you can use just the first term
$term_id = $terms[0]->term_id;
and now you have the term id inside $term_id
.
update
Once you have the term_id you can use it in your function like so:
$term_id = $termid->term_id;
$meta = isset($meta[$term_id]) ? $meta[$term_id] : array();
Related Posts:
- Add default WordPress tag meta box to User Profile
- Custom taxonomy hide meta box but show in menu
- How do you remove a Category-style (hierarchical) taxonomy metabox?
- Add description to custom taxonomy admin metabox
- Automatically assign taxonomy term if custom meta value exists
- How can I conditionally change the title of a taxonomy meta box?
- How to Put Custom Taxanomy Meta Box in Main Column
- Metabox to list/store a certain type of post tag
- Adding content to a taxonomy metabox
- Render P2P metabox per taxonomy term
- Create custom taxonomy and Display in metabox dropdown
- Separate tags with semicolon
- Remove taxonomy widget from “PAGE” post
- unable to save custom taxonomy terms in a custom-built metabox in wp-admin
- Dropdown list of taxonomies won’t display selected
- Extra Meta Data for WordPress Multisite Taxonomy
- Remove Custom metabox from particular page template is used
- transfer two existing taxonomy terms into one custom metabox
- Looking for suggestions on creating simple database (Help!!)
- How to show/hide a meta box using categories, with a different post type
- Does a codex exist for creating meta boxes in taxonomy
- Attaching meta box to specific category/taxonomy in custom post type
- register_taxonomy – show in admin menu, but not on post type (edit) screen
- Taxonomy Extra Meta [duplicate]
- Modify Term List in Custom Taxonomy Meta Box
- Get term SLUG by term ID
- WordPress taxonomy radio buttons
- Custom taxonomy, get_the_terms, listing in order of parent > child
- Custom Taxonomy Archive Page
- Get taxonomy names by post id
- restrict_manage_posts not working in 3.3.1
- Custom taxonomy on users with UI
- Get terms of posts with category with sql
- Get main parent categories for a product
- Echo Custom Taxonomy Field Values Outside the Loop
- Taxonomy Relationships
- get_the_term_list without specific category
- Add Category Name to REST API
- Display the Terms from a Custom Taxonomy Assigned to a Post(inside the loop) in Hierarchial Order
- Edit post meta with checkboxes on front end
- drop-down list taxonomy problem
- How to display custom taxonomy in multiple columns?
- Custom taxonomy sort by term meta in admin columns
- Storing data into custom taxonomies VS post custom fields (post meta)
- Programatically added attribute, set to ‘show on product page’ automatically. Woocommerce [closed]
- WordPress Custom Taxonomy – Volume / Issue – Unique Slug Issue
- How to show the entries in a custom taxonomy by author?
- ACF vs Taxonomies
- Custom fields to taxonomy
- Correct way to insert taxonomies on page insert
- Styling Taxonomy Terms Individually
- Get terms cross-taxonomy query
- Custom Taxonomy Template Error: Catchable fatal error: Object of class WP_Error could not be converted to string
- Custom Taxonomy in default RSS feed
- How to make custom post taxonomy looks like regular categories?
- Create Geographical regions -> countries structure and relationship with taxonomies
- Unexpected results from get_taxonomies() and {$taxonomy}_edit_form and related hook
- Custom taxonomy link opens under Posts
- Changing URLs for taxonomies and CPT
- how to store values in database at hierarchical view
- Strip tags from a the terms() function
- Why can’t I use an array of term slugs in WP_Query?
- Using wp_dropdown_categories in widget options
- Trying to add taxonomy to get_categories() but it’s not working. How to fix this?
- Custom taxonomy archive page requires ?post_type= in url
- Custom taxonomy terms not showing as list Gutenberg Editor WordPress
- Twin value tags as an esoteric taxonomy
- Clean Custom URL for Serach + Custom Taxonomy
- Advanced search redirecting to another page then filter further
- Filter through custom taxonomy with an array of taxonomy IDs
- Removing numerous Meta boxes from numerous CPTs
- Limit Display Number Of Taxonomy Term
- Custom arguments in WP_Query
- Several taxonomy query (like filter)
- Current taxonomy name (not term!) given a post ID
- Taxonomy Overview Page?
- Search box with field hidden till drop down selection is made
- Can You Build Page Templates Without Extra Files
- How do i make this Taxonomy term code work?
- Unable to get the Parent Custom Taxonomy Terms
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Taxonomies on Pages with Custom Formatting
- Is there a way to nest taxonomies or custom fields deeper than one level below the post type?
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Showing custom taxonomy in woocommerce signle product page
- Main query disturb pre_get_post by category query
- Get custom taxonomy terms that contain posts that have another taxonomy term
- How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
- How to get list of custom taxonomies based on custom post type
- how to filter the data’s comparison operators (>= &
- Using wp_tag_cloud with only current post tag with special class
- Creating a list with multiple categoreis and options
- Custom taxonomy rewrite in permalinks for posts gives 404 on pages
- Query pages by child term
- Custom taxonomy applied to links [duplicate]
- Next/Previous links in custom taxonomy, where item may belong to multiple terms
- Insert term description programmatically into hierarchical custom taxonomy
- Custom Taxonomy + JQuery Tabs
- Custom Taxonomy Template Variables Available?
- i need to show featured post on custom taxonomy page