Hi,
I am trying to build a historical website, where certain persons are tagged and connected to different pictures and can be searched etc.
I also have more detailed pages where the persons relationsship is shown (mother, father, childs etc.)
So I created custom posts and fields.
I also created a taxonomy "person" - which I would like to reuse.
Say for example the person is in the picturexx - I just get the person from the taxonomy list.
But If I use fields in order to input the relationship e.g a field for "wife" - I would like to show the same list of persons in order to choose the right person.
Is it possible to use taxonomy entries within fields - in order to choose?
I hope you understand what I want to do / mean.
best regards
Michael
Dear Michael,
There isn't such a built-in feature within Types plugin or CRED plugin.
If your custom field is a custom select/radio field created with Types plugin, you can setup some custom PHP codes with Types filter hook "wpt_field_options", in this PHP function, get the terms of taxonomy "person":
https://developer.wordpress.org/reference/functions/get_terms/
Then setup the options of the custom select field, see similar thread here:
https://toolset.com/forums/topic/i-wish-i-could-load-a-custom-select-with-options-from-a-custom-taxonomy/#post-284584