Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having a problem for a while now and I canĀ“t seem to solve it on my own.

I have made a website, this website is multilingual and it was made in wordpress.

In my "photo album" page when I sort the items in the default language (English) everything works fine, however if I change to another translation (ex.french), the name of the category changes and the tagged items don't appear anymore.


In my database I manage to find the table and the rows of each category, I want to be able access it in a different language, each one has an unique ID.

I know I have to grab the ID from the database of each category and return it to my PHP script.

This is my code that prints the section,

<ul class="filter_portfolio">
    // Get the taxonomy
    $terms = get_terms('filter', $args);
    // set a count to the amount of categories in our taxonomy
    $count = count($terms); 
    // set a count value to 0
    // test if the count has any categories
    if ($count > 0) {
        // break each of the categories into individual elements
        foreach ($terms as $term) {
            // increase the count by 1
            // rewrite the output for each category
            $term_list .= '<li class="segment-'.$i.'"><a href="javascript:void(0)" data-value="' . $term->slug . '">' . $term->name . '</a></li>';
            // if count is equal to i then output blank
            if ($count != $i)
                $term_list .= '';
                $term_list .= '';
        // print out each of the categories in our new format
        echo $term_list;

However I am not good enough to do this on my own, and I would be very happy if someone could help me out on this one.

Thank you

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.