Support » Fixing WordPress » Custom taxonomy relation to another custom taxonomy

  • Hi guys,

    I have two custom taxonomies – Language and Country.
    And I want to make two dropdown list boxes – Language and Country.
    When I choose Language – English, I want to have in second dropdown list box have all the Countries that posts with Language – English have.

    And my problem is, that I don´t know, how to make a code that will give me list of Countries which are “tagged” with my custom taxonomy Language – English.

    I hope you understand me 😀 ..

    Thank you guys for help

Viewing 1 replies (of 1 total)
  • This is kinda complicated if you’re not a developer.

    Here’s the codex on the function for getting the categories into a dropdown box: http://codex.wordpress.org/Function_Reference/wp_dropdown_categories

    You would change 'taxonomy' => 'category', to the slug for your Language taxonomy to display that list on a post or a page.

    You’d need to define the relationship between the countries and the languages. How are you doing that?

    Where do you want this displayed? And are you trying to retrieve posts with both “English” and “UK”? Or does it need to show “English” plus “UK” **and** “US” and every other English-speaking country? Then it gets even more complicated if you need it to go the other direction (countries where multiple languages are spoken).

    Some forms plugins might be able to do part of the dropdown-data-relationship part for you – probably still would need customization or configuration but wouldn’t be that hard. I know that Formidable Pro has some of these features in an add-on module that they offer – it would get you at least partway there. It’s part of their premium plugin so there is a charge (I don’t work for Formidable, just a happy user of their product). You can see it here: http://formidablepro.com/knowledgebase/formidable-locations/

Viewing 1 replies (of 1 total)
  • The topic ‘Custom taxonomy relation to another custom taxonomy’ is closed to new replies.