WordPress.org

Ready to get started?Download WordPress

Forums

get_categories for multi languages (6 posts)

  1. morganpt
    Member
    Posted 2 years ago #

    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

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    Is "content composer" a theme or a plugin?
    How did you set up your different languages? With a plugin? Multisite?

  3. morganpt
    Member
    Posted 2 years ago #

    I am using the plug-in WPML (http://wpml.org/) which provides translation and editing support.

  4. keesiemeijer
    moderator
    Posted 2 years ago #

    Have you tried their support forum: http://wpml.org/forums/forum/english-support/

  5. morganpt
    Member
    Posted 2 years ago #

    You'r right. I am going to post there. Tks

  6. salmanhamid40
    Member
    Posted 2 years ago #

    We are trying two word press posts with same id (different language, one in english and other in urdu) so that user can see posts in either language by using language filter.

    Would you please advise how can we make two posts with same id.

Topic Closed

This topic has been closed to new replies.

About this Topic