get_categories only getting categories in the main language

Question

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

My code is:

Category

All

    $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>

Any idea on how to get all the categories or the ones of the active language in the WP backoffice?

0
, Pedro Ferreira 9 years 2012-06-12T14:39:02-05:00 0 Answers 121 views 0

Leave an answer

Browse
Browse