Before You Start
You need Listeo theme, Listeo Core, Listeo Forms & Fields Editor and Listeo Elementor 2.3 or newer. Update them together. You also need at least one custom taxonomy for the child list. If you have not created one yet, read Custom Taxonomies first. Nothing changes on your site until you set a parent taxonomy.
How It Works
You keep two separate, flat taxonomies, for example Make (lt_make) and Model (lt_model). Then:
- The Model taxonomy gets Make as its parent taxonomy.
- Each model term gets its parent make or makes. A4 belongs to Audi, Transit to Ford.
- A Chained select for Model in a form shows only the models of the make chosen in the same form.
When to use it
- Make → Model → Generation for vehicles.
- Country → City, or Region → City, when regions are not enough.
- Brand → Product line, Course → Module, any list where the second choice depends on the first.
- The child must be a custom taxonomy (
lt_...). The parent can be any listing taxonomy: another custom taxonomy, Categories, a listing type’s categories, Regions or Features. - A chain can have up to 5 levels in total, for example Make → Model → Generation.
- A term can have several parents. A city named Springfield can belong to several states.
- A term with no parent is offered under every parent.
Step 1: Set the Parent Taxonomy
- Go to WP Admin → Listeo Editor → Taxonomies.
- Open the child taxonomy, for example Model, or create it.
- In the Relation block, choose the Parent taxonomy, for example Make (lt_make). The list is grouped into Custom taxonomies, Categories and Other taxonomies.
- Click Update Taxonomy.
The parent’s edit screen now lists the child under Used as parent by.
Step 2: Assign Parent Terms
There are three ways. Use the one that fits the size of your list.
One term at a time
- Go to WP Admin → Listings → Categories and click Manage Terms on the Models card.
- Add or edit a term. Use the Parent Make field: type to search and pick one or more makes.
- Save the term. Leave the field empty to offer the term under all makes.
The terms list gets a column with the parents of each term. A term without a parent shows Any. Above the list you can filter by parent, or click Without parentto find terms that still need one.
In bulk
- On the terms screen, check the terms, for example all BMW models.
- In Bulk actions, choose Assign parent. A picker appears: choose one or more parent terms.
- Click Apply.
Remove parent works the same way. Leave the picker empty to remove every parent from the checked terms.
From a CSV file
Best for long lists, for example every make and model of a car market.
- On the terms screen of the child taxonomy, click Import CSV. The window Import Models from CSV opens.
- Choose a CSV file, or paste the lines in Or paste lines.
- Check The first line is a header if your file starts with column names.
- Check Create missing Makes if the file contains makes that do not exist yet. Without it, lines with an unknown make are skipped.
- Click Start import. You can click Stop at any time.
The file format is one line per term, parent first:
Make,Model
Audi,A4
Audi,A6
BMW,3 Series
BMW,X5
Ford,Focus
Ford,Transit
- Terms are matched by name or slug. Missing child terms are always created. Missing parents are created only with Create missing … checked.
- Comma, semicolon or tab separated files all work.
- If the parent taxonomy has its own parent, a line can have three values:
Make,Model,Generationon the Generation screen. - Running the same file again adds nothing twice.
- A term without a parent is offered under every parent. Once it gets a parent, it is offered only there.
- The file can be up to 5 MB. Split larger files.
- Save the file as CSV UTF-8. If Listeo cannot read some characters, it asks you to save the file again in that format.
At the end you see how many terms were created, how many links were added, which were already linked and which lines were skipped, with the reason for each line.
Step 3: Add a Chained Select to the Add Listing Form
- Go to WP Admin → Listeo Editor → Add Listing Forms and open the form of the listing type.
- Add the parent taxonomy (Make) with any taxonomy field type, for example Select taxonomy.
- Add the child taxonomy (Model) and set its field type to Chained select (loads options by parent). This type is offered only for taxonomy elements.
- Put the parent before the child.
- Click Save Changes.
In the form, Model stays locked (“Choose the previous option first”) until a make is chosen. Changing the make clears the model and loads the new list. When the listing is saved, a model that does not belong to the chosen make is rejected with a message such as “Model does not match the selected Make.”
Warnings in the editor
The editor checks chained selects and shows a warning when something will not work well. These are warnings only, you can still save:
- The form has no element for the parent taxonomy, so the chained select offers all models.
- The parent is on a later step of a multi-step form. Move it to the same or an earlier step.
- The parent’s section is not in any step, so the parent is never shown.
- The parent is a Hidden input, so the child may stay locked.
- The element uses Chained select, but its taxonomy has no parent taxonomy. It then works like a plain taxonomy select.
Step 4: Add a Chained Select to a Search Form
- Go to WP Admin → Listeo Editor → Search Forms and open a form.
- Add Make from Available Elements → Taxonomies.
- Add Model. A taxonomy with a parent starts as Chained select (loads options by parent). Check the Type in its side panel.
- Click Save Changes.
In search, a model that does not belong to the selected make is ignored, so an old link such as ?tax-lt_make=audi&tax-lt_model=x5 still shows Audi results. With Adaptive filters on, the chained select can also grey out models without results and show counts such as “A4 (12)”. See Adaptive Search Filters and Result Counts .
Combining With Visibility Rules
Related taxonomies work with visibility rules . Example: show Make and Model only for Cars and Motorcycles with Where this taxonomy applies. If the parent element is hidden by a rule, the child works on its own and offers all its terms.
Limitations
- On a Model term page (for example
/model/a4/), adding a make that does not match in the address returns no results. - Polylang: the chained select does not switch the language of the options it loads. WPML is supported.
- Only custom taxonomies can be the child of a relation.
- Terms are not part of Listeo Editor → Export & Import. Use the CSV import on the other site.
FAQ and Troubleshooting
-
The Model list shows every model, not only the chosen make's
-
The Model list stays locked
-
The import skipped many lines
-
Can a model belong to two makes?
-
Does this work with thousands of terms?
-
Can I link Regions to a custom City taxonomy?
Related Articles
- Custom Taxonomies
- Field Visibility Rules
- Adaptive Search Filters and Result Counts
- Search Form Elements Reference
- Add Listing Form Editor
For Developers
- The parent taxonomy is the
parentkey of the definition in the optionlisteo_custom_taxonomies. - Parent terms are stored in the term meta
_listeo_parent_termsof the child term, one row per parent term ID. - The logic lives in
Listeo_Core_Taxonomy_Relations, for exampleparent_taxonomy( $taxonomy )andfilter_belonging( $ids, $parent_ids, $parent_taxonomy ). listeo_core_child_terms_args($args,$taxonomy,$parent_ids): theget_terms()arguments of one level of a chained select.
Public endpoint
The chained select loads its options from a public GET request. It has no nonce, so it works behind page caches, and browsers may cache answers for 300 seconds.
GET /wp-admin/admin-ajax.php?action=listeo_core_child_terms
&taxonomy=lt_model
&parent_slugs=audi,bmw (or &parents=12,13 with term IDs)
&search=a (optional)
&limit=200&offset=0 (optional, at most 200 per page)
&lang=de (optional, WPML)
{"terms":[{"id":1,"slug":"a4","name":"A4"}],"more":false}
It answers only for public listing taxonomies that have a parent taxonomy or are custom taxonomies.