WordPress.org

Support

Support » WP-Advanced » get_categories for multi languages

get_categories for multi languages

  • I am trying to retrieve in the “content composer” the categories of projects based on the active language. But i only get the categories of the main language, never on the other languages.

    My code is:

    $categories = get_categories('taxonomy=jw_portfolio_categories');       
    
                        if(!empty($categories)){
                            foreach($categories as $cat){
                                ?><option value="<?php echo $cat->term_id; ?>"><?php echo $cat->name; ?></option><?php
                            }
                        }
        ?>
                    </select>

    Even if i change the backoffice active language the categories are always the same. Any ideas?

    best
    Pedro

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘get_categories for multi languages’ is closed to new replies.