Support » Plugin: Stella plugin » Getting right language for listing child posts

  • Hi,

    First off – great plugin! Keep up the good work!

    I want to list a submenu for certain categories where I display the child posts of the parent category. My code looks like this at the moment:

    <?php $this_cat = (get_query_var('cat')) ? get_query_var('cat') : 1; ?>
    <?php $this_category = get_category($this_cat);
    if ( $this_category->parent ) { $this_cat = $this_category->parent; } ?>
    <?php wp_list_categories('orderby=ID&order=DESC&show_option_none=&title_li=&hide_empty=0&child_of=' . $this_cat . ''); ?>

    This only displays the titles in the default language. How do I show titles in the language selected by the visitor?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ruslan.Khakimov


    There are you calling this code? (May be Stella is not initializated )
    What is the Stella version?

    I’m using Stella version 1.3 build 42 and calling the code in header.php. Swedish is the default language and English is the secondary. Stella is activated, because everything else is working fine and all posts are showing in the chosen language, but calling wp_list_categories only shows the titles in the default language..

    Any ideas?

    Plugin Author Ruslan.Khakimov


    Can you check this code if with fixed $this_cat? Is it work? (for me – yes )

    I feel so stupid. I must have been tired when I posted the question. The problem is that the submenu is child categories to the category being viewed and there is no setting option to translate category titles 🙂
    Any idea how I should solve it?

    For clarification:
    When viewing a certain category, all child categories should be displayed and in English, not the default language Swedish.

    Is it so that translating Categories only comes with the full version of Stella?

    Plugin Author Ruslan.Khakimov


    Yes, localization of categories is full version feature.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Getting right language for listing child posts’ is closed to new replies.