Options Framework
Categories by language (3 posts)

  1. drago239
    Posted 1 year 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.


  2. Tim
    Posted 1 year 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
    Posted 1 year 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Options Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic