WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using WPML for multi-language website. It works really well except for custom taxonomies.

In admin, I can only join foreign posts to foreign taxonomies (which is exactly what it should do) but on the public area, when retrieving taxonomies it seems that the current language is ignored: I get all taxonomies.

Any help would be greatly appreciated !


share|improve this question

hack for filter the_terms:

$terms = get_terms('YOUR-TAXONOMY','hide_empty=1' );
if (!empty( $terms )){
  $term_links = "";
  foreach ( $terms as $term ) {
  if($term->term_id == icl_object_id($term->term_id,'YOUR-TAXONOMY',false,ICL_LANGUAGE_CODE)){
    $term_links[] = '<li><a href="'.$category_url.'?YOUR-TAXONOMY='. $term->slug.'">
     ' . $term->name . '' . $term->name . '</a></li>';
echo join( '', $term_links );
share|improve this answer
up vote 0 down vote accepted

I found out that when retrieving the taxonomy you have to do this :

    $args = array(
        'hide_empty' => true,
        'taxonomy' => 'projet_thematique'
    $thematiques = get_terms('projet_thematique', $args);

The thing was done by adding the 'taxonomy' as an argument as well.

I hope it will be usefull for others ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.