You’re using $term->ID
. Taxonomy terms do not have an ID
property. They have a term_id
property:
$display_type = get_term_meta( $term->term_id );
You’ll notice that WooCommerce is using this, while your attempts are not.
Related Posts:
- Display current ranking of post as a number in post title
- Explanation of update_post_(meta/term)_cache
- Exclude a category from the filed under list
- Short of raw SQL, can I query for multiple attachment metadata that have a given array key?
- Triple meta_key on custom SELECT query
- Get updated post meta on save_post action?
- Job of meta_key meta_value fields in database tables
- order by multiple meta_keys?
- How to get the total number of meta_values based on a custom post type?
- WP_POSTMETA – What do these values mean inside the data structure?
- MySQL Query To Select Post By Postmeta
- How can I convert postmeta from unserialized to serialized?
- Set Condition echo function get_post_meta
- Get a row from a separate table by matching a posts meta_key to a tables ID column
- Compare string with post id in wpdb and do stuff when match is found
- Read post meta values, only if posts are public
- How to test the outcome of a wpdb query?
- why after saving meta value it’s saving all the values the one that i clicked?
- Is it safe to add a new field to meta_value field?
- How can I use ‘orderby’ => ‘meta_value_num’ to order by the numerical value even if the value starts with a word?
- wpdb->get_var – count author posts, meta value
- How to query and update one colum in postmeta table?
- I can not display meta value in extras.php and template-tags.php
- get specific values from WordPress meta_value
- Count Post and Page Views based on meta_value Using Shortcode in Dashboard Widget
- Negative meta_query if storing multiple post_meta values with shared meta_key
- if get_post_meta function returns empty – Do Not Display HTML
- Get data from custom table and update relative post_meta based on meta_key
- Save queried result into database
- I Can’t get the post_tag name from term_id using wp_set_object_terms
- How to get the total of two meta values from different meta keys?
- How to save a meta_value as a numeric value after I retrieve it via update_post_meta?
- How to update/add child posts meta whenever the parent post meta is updated?
- Get table parameter and save in meta value
- Multiple meta key and value search in the query
- Exclude category from DB query
- How to sort by meta value num, but ignore zero value?
- Fetching array of postmeta with $wpdb and in_array conditional
- Which query method to use? (edit- wpdb syntax problems)
- Cache metadata for set of posts
- How to get all the related ids without array?
- Get posts by meta value
- advanced custom fields update_field for field type: Taxonomy
- update_post_meta not saving when value is zero
- Restrict post edit/delete based on user ID and custom field
- Remove post meta keys
- Should I sanitize custom post meta if it is going to be escaped later?
- List posts under meta_value heading
- loop through all meta keys with get_post_meta
- How to use a Term Meta Field as a link
- How to best delete orphan wp_postmeta
- Saving html into postmeta without stripping tags – safe?
- How to show Published date and/or Modified date
- wp_update_user isn’t instantly?
- “update_post_meta” not working in “wp_insert_post_data” hook
- Display All Custom Post Fields and Values, Unless Empty
- How to create a meta_query to get all posts with a specific meta data?
- hide posts with specific meta data from admin page
- Post MetaTable Overload
- Custom RSS Feeds & Post Meta Data
- get_post_meta not extracting title,permalink and posttype
- Display get_post_meta if contains value
- Save post meta foreach loop
- Should I save this mulit dementional arary as one post meta?
- Sort Posts By Custom Field Date?
- Difficultly changing date format in post meta value
- Remove last character in get_post_meta
- mass delete posts based on metadata
- How to obtain a group of post meta and assign each meta to other variables?
- Duplicate rows in meta table, any known relations in WC?
- Adding Custom MetaData
- Suggestion to make posts have multiple associated items
- update_post_meta in loop changing ALL values
- Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?
- How to echo value of a meta select box to the browser
- updating one custom meta field only
- New Table vs Post / Comment Meta
- How do I add a fixed value to get_post_meta();?
- Add post’s category as a meta tag to the post
- Trash Bin for Categories?
- How can I query for posts using a date stored in post-meta?
- Is duplicate `_wp_attachment_image_alt` meta key allowed?
- How can i set media attachments to the author of the post or page for already existed posts with attachments
- How to get posts by meta value as multi-dimensional array?
- How to modify default meta link format
- Something adding an excessive meta description
- how to query posts using value in meta post array
- Why doesn’t wp_oembed_get() for the video post format not work?
- Custom Meta Fields that are Echo’d are removed on post update?
- How to add dynamic content in title and meta description in wordpress theme for homepage, post page, category, tag and pages
- How to call get_post()?
- Use $wpdb->get_results with filter based on array
- add_post_meta only adding 1 character
- How to get several fields from wp_query?
- Posts with no meta field do not appear when sorting by meta field
- Counting number of identical meta keys
- query with custom field
- Using Form to alter PHP variable [closed]
- Chance post id into post name
- wordpress query making site very slow