Answer the question
In order to leave comments, you need to log in
Complex issue. How to make automatic selection of categories from other taxonomies?
Hello.
The default post type is used + additional taxonomies have been added to it. Taxonomies are cities + categories for them:
taxonomy - moscow site.com/moscow/restourants
taxonomy - kiev site.com/kiev/restourants
There is a default taxonomy for posts, it is used as a general one in which posts from all cities are shown.
The question is:Is it possible to do, when choosing a rubric for example "Restaurants" from the Moscow taxonomy, the same rubric from the "general" taxonomy was automatically selected. Why do I need this, I want to make a form for adding posts from the front end. When adding posts from the front, each time through the admin panel you will have to set the headings in the general taxonomy, and displaying the heading selection in the front 2 times is somehow not very good for users.
There is a pro version of the ACF plugin.
Answer the question
In order to leave comments, you need to log in
You need 2 taxonomies - cities and types (however, types could be divided into separate taxonomies, but you already need to look at the TOR and delve into it, maybe in the long term it would make sense, maybe not). You assign terms to each entry separately from each other. Each entry must have a "city" term (Kyiv, Moscow, etc.) and type terms - one first level (Restaurants, Sports) and one or more second level (eg TRX, squash and gym in the same sports complex). Did you understand the structure?
Please note that the tree of terms "Restaurants, Sports, etc" not under "Moscow" should be the same as yours. These should be independent taxonomies, they are not related to each other in any way. The entry derives independently the term(s) from one and the other. Only the record knows about 2 taxonomies, the taxonomies themselves should not know about each other and there should be no connection between them.
With this (architecturally correct) approach, your question loses its meaning.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question