Tell me how to display registered taxonomies, such as category and post_tag and assign them to an arbitrary record type? There can be a lot of registered arbitrary taxonomies. On the settings page of an arbitrary record type, you need to display a list of taxonomies (category, post_tag), the checkbox for selecting the desired taxonomy should be on against each taxonomy.
those. you need to make it possible to select the desired taxonomy and assign this taxonomy to an arbitrary type. Such an option as register_post_type is not suitable, because you need to assign a taxonomy precisely by choosing from a list of existing taxonomies on the settings page of an arbitrary type. Plugins are also not suitable.
I tried to display labels with $ tags = get_tags (), but for some reason the empty array is returned, although there are labels, so I am at a loss and ask for help.
- You want here to get the whole plugin painted. And taxonomies to display, and place the checkboxes (arrange options page), and meet a number of conditions. Well, at least get_tags was carried out in a separate question, it’s not a topic here at all. The question is still too general, goes beyond StackOverflow. It is not clear what you have done yourself. Therefore, this task is better to apply for freelancing. - KAGG Design
- I do not need to paint about how to create flags. It goes without saying that a completely different question is not related to the topic. It is important for me to know how to derive these taxonomies and how to assign them to an arbitrary type. - word
- most likely I found the answer to the first question, this is with the help of get_taxonomies () - word
- now I need to learn how to assign these taxonomies correctly for an arbitrary type on the settings page. For this, the register_taxonomy_for_object_type function is most likely suitable, but it needs to be called on the init hook, and the settings page is loaded before this hook - word
- so, I needed to learn only two functions: get_taxonomies () and register_taxonomy_for_object_type). - word
|