Support » Developing with WordPress » 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');       
                            foreach($categories as $cat){
                                ?><option value="<?php echo $cat->term_id; ?>"><?php echo $cat->name; ?></option><?php

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


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.