WordPress.org

Ready to get started?Download WordPress

Forums

Options Framework
Categories by language (3 posts)

  1. drago239
    Member
    Posted 6 months ago #

    Is it possible to display categories, pages and posts by language in select dropdown? I would like to display only categories, pages and posts by language in select options.

    I'm using Polylang for multilanguage and tried pll_get_term and pll_get_post and I couldn't display it by language on theme option page.

    And I'm using starter theme by Underscores.

    https://wordpress.org/plugins/options-framework/

  2. Tim
    Member
    Posted 5 months ago #

    I also would like to know if and how it is possible to get languages from polylang into theme options.

    No luck with: pll_the_languages();

    - Maybe with a custom query, not a very nice way tho.

  3. Tim
    Member
    Posted 5 months ago #

    This maybe helps you.

    $result = mysql_query("SELECT * FROM wp_term_taxonomy WHERE taxonomy='language'");
    
        while($row = mysql_fetch_assoc($result)){
            $locale = maybe_unserialize($row['description'])['locale'];
            $options[] = array(
                'name' => __('Footer Settings '.$locale, 'options_check'),
                'type' => 'heading');
        }

    Not sure if it is a right way to approach, but it works.

Reply

You must log in to post.

About this Plugin

About this Topic