Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [term-meta]

The tag has no usage guidance.

0
votes
0answers
19 views

How to add new term-meta field in get_the_term array?

I am creating an API which is based on for category posts. In taxonomy category there is one ACF field for image upload. In API i am fetching category values like this: $cat_post = new stdClass(); ...
0
votes
1answer
26 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
119 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
123 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
172 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
31 views

How to change default meta values in wordpress

I am very thankful to you all.
0
votes
1answer
314 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
865 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
465 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 ...
0
votes
2answers
1k 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
850 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
36 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
14k 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( '...
3
votes
3answers
13k 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
761 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 ...
6
votes
5answers
15k 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 ...