I have a custom post type with a Select field with the title "Nationalitet" (slug: runner_nationality). And I have a taxonomy titled "Nationaliteter" (slug: nationalities). Now I want to fill the select box with the terms in that taxonomy, when adding/editing posts in the admin.
Hello. Thank you for contacting the Toolset support.
Well - It seems you are not returning the $options that is why your select field remains empty. Could you please try to use the following code and try to resolve your issue.
Thanks. However, that generates a blank page. In the Console I get the following message: Uncaught TypeError: Cannot read property 'value' of null
at checkIframe (serp.js:140)
at HTMLDocument.<anonymous> (serp.js:9)
at j (jquery.min.js:2)
at k (jquery.min.js:2)
Well - I need to check why its not filling the term.
Could you please share problem URL and access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
After some testing with other taxonomies I have realized that if a term is used in a post type, then it will also show up in the Select box. But in this case I will only use terms via the select box field... And I will only add new terms via the page for editing terms for a taxonomy.
How then can we change the code to find all terms, whether they are used in a post type or not?