My get_terms not working for custom fields

Question

This works and generates results:

{% set query_parameters = {
   taxonomy: term.taxonomy,
   parent: term.id,
} %}
{% set terms = wordpress.call('Timber::get_terms', query_parameters) %}

But this doesn’t:

{% set query_parameters = {
   taxonomy: term.taxonomy,
   parent: term.id,
   meta_query: {
     0: {
       key: 'test_type',
       value: '8114',
       compare: 'LIKE',
     },
   },
} %}
{% set terms = wordpress.call('Timber::get_terms', query_parameters) %}

test_type is a custom field created with ACF. A dump of the results that do work contains:

["test_type"]=> array(2) { [0]=> int(8114) [1]=> int(8115) }

What could be wrong?

0
RubyTuesday 6 years 2016-11-30T10:05:48-05:00 0 Answers 48 views 0

Leave an answer

Browse
Browse