What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Questions tagged [term-meta]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
402 views

Notice: Trying to get property 'term_id' of non-object

I receive the error on taxonomy page in wp-admin.Before this error, I had problem that couldnt add the taxonomy to menu because of my taxonomy code.I fixed the code then the current error became.So, ...
0
votes
0answers
211 views

Is it possible to add Term Meta Fields to a WooCommerce Attribute?

Is it possible to add Term Meta Fields to a WooCommerce Attribute? I know I can do this with regular categories, but I'm wondering if there is a way to do this with product attributes. (without a ...
0
votes
0answers
28 views

Get_term_meta() always returns false

I added an extra field (dropdown list with select options), when the user creates or edits a category from the WordPress dashboard. I am also able to store the selected value in the wp_termmeta table. ...
0
votes
1answer
226 views

What is the “meta” key in WP_Term Object?

I thought it would be term meta but that doesn't seem to be correct. For illustration I've created a category named "Test" with a slug of "test". I'm updating its term_meta with: update_term_meta( ...
0
votes
1answer
173 views

meta_query to check all custom fields

I have to use the meta_query argument so that it checks for a keyword in all available custom field values (in array format) saved for the object. The meta keys are different for every object, ...
1
vote
1answer
271 views

Audio player shortcode not showing up when using variable

I am trying to call a custom term meta field in an audio shortcode that I have placed on a custom page that I am working on. The field contains a link to a .mp3 file that I have uploaded to my media ...
1
vote
1answer
624 views

get_terms() order by term_meta

I'm doing a get_terms() query that I'm trying to order by a custom term meta. The custom term meta key is 'order' which as a numeric value (between 1 and 10). I have tried the following, but the order ...
0
votes
1answer
338 views

Query Custom Post Type by Taxonomy Meta Value

I need to filter my custom post type "events" by Taxonomy Meta Field "city". But I can't make it work and need some help? This is what I already have. But no results... function aa_pre_get_posts($...
0
votes
1answer
34 views

How to change default meta values in wordpress

I am very thankful to you all.
0
votes
1answer
603 views

Term Meta - saving multiple values in one form with select options

I have a working method for adding Term Meta for Taxonomy Terms. CPT is 'houses' and Taxonomy is 'house_feature'. This is my code... First, possible values in an array: $feature_groups = array( '...
1
vote
2answers
1k views

WP_Query, tax_query and term_meta: How to?

I have a custom post type product (wine). Each of the following is a custom taxonomy: Vintage (Year of harvesting) [only one per wine] Family (Grape variety) [may be more than one] Size (Bottle Size) ...
1
vote
1answer
732 views

Get ID of current taxonomy in register_rest_field

I have a term field created with types plugin and attached to the "category" taxonomy. I need to get this field in the api rest. You cant get the termmeta in types plugin like this ...
2
votes
2answers
2k views

Create taxonomy with meta term using the WP Rest Api

I am trying to create taxonomy elements (the taxonomies are already registered) from the front end using the REST Api v2. I am able to do so except not able to save the meta fields from the taxonomies....
0
votes
1answer
1k views

Adding custom ID field to the categories

I'm writing a plugin for importing products and categories from another CMS into Wordpress (with Woocommerce). To keep the structure of categories and to put products into the right categories I would ...
1
vote
0answers
42 views

How to include term custom meta into the custom taxonomy term permalink structure

I made a custom taxonomy and I'm trying to customise the permalink structure for each term by using term custom meta. At the moment I have a custom post type magazine_article and a custom taxonomy ...
0
votes
1answer
20k views

Using get_terms() with meta_query parameters

Im trying to build a taxonomy query to only display the terms that have a certain custom field value assigned to it. The custom field holds a boolean value, so I tried: $args = array( '...
4
votes
3answers
22k views

Get term by custom term meta and taxonomy

How to get term by custom term meta and taxonomy or how to filter tax_query by term meta instead slug/id? function custom_pre_get_posts($query) { global $wp_query; if ( !is_admin() &&...
1
vote
1answer
1k views

Failure to add term meta

I'm working on a modification to a custom taxonomy that would allow content managers to specify a numeric order in which the terms shall appear in a widget. They can't rely on the alphabetical order ...
7
votes
5answers
17k views

Add custom taxonomy fields when creating a new taxonomy

Edit: Important note for WordPress v4.4 onward This question used a great workaround for the lack of real term meta in older versions of WordPress, but since the release of WordPress v4.4, real term ...