get_terms() ignores ‘lang’?
-
Hi,
I am using a custom taxonomy with few terms, translated into three languages. I only want to get the terms in the current language, so I am doing this:$options = array( 'taxonomy' => 'event_category', 'hide_empty' => false ); if (function_exists('pll_current_language')) { $options['lang'] = pll_current_language(); } $terms = get_terms($options);
The $options array then includes ‘lang’ => ‘de’, but I am getting ALL the existing terms anyway. Doesnt matter what I use as the lang parameter, I am getting all the taxonomy terms in the database for the ‘event_category’ taxonomy.
Is this a bug?
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘get_terms() ignores ‘lang’?’ is closed to new replies.