How to use get_terms() returning only the terms that have posts with a certain custom field value

Question

I use get_terms() to build filter buttons to enable filtering a list of events (custom post_type).

$terms = get_terms( 'kategorien', ['orderby' => 'slug', 'hide_empty' => 1 ]);

Now we want to show only the terms of posts having a certain meta_value.
Anybody knows how to achive this?

Thank you!

0
Fint 1 month 0 Answers 7 views 0

Leave an answer