WordPress.org

Ready to get started?Download WordPress

Forums

Stella plugin
Getting right language for listing child posts (7 posts)

  1. khosh
    Member
    Posted 1 year ago #

    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?

    http://wordpress.org/extend/plugins/stella-free/

  2. Ruslan.Khakimov
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. khosh
    Member
    Posted 1 year ago #

    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?

  4. Ruslan.Khakimov
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. khosh
    Member
    Posted 1 year ago #

    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.

  6. khosh
    Member
    Posted 1 year ago #

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

  7. Ruslan.Khakimov
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, localization of categories is full version feature.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic