I have created a couple of custom taxonomies with Toolset Types. I want to show these taxonomy meta boxes only on the editor pages that use a specific template, not all of the pages. Is there a way to do that? For your information, I use the latest version of WordPress and the Gutenberg block editor.
Hello. Thank you for contacting the Toolset support.
Do you mean when user loggedin with Editor user role - you want to display taxonomy with specific conditoin? If yes - you want to display those taxonomy when editing post in backend or you want to display those taxonomy conditionally.
If you can share bit more information about your requirement and share few screenshot that should help me to understand your issue, once I review the information you shared I will be able to guide you in the right direction.
*** 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 have set the next reply to private which means only you and I have access to it.
I see you are using block based version and to remove the metaboxes for custom taxonomy I've added the following code to the "Custom Code" section offered by Toolset with code snippet namely "remove-tax-metaboxes":
=> hidden link
Thanks for the code. If possible, I would like to use a different approach outside of REST API because I want to use the page template as a conditional factor. Are there any other approaches outside of REST API?
Or if there is a way to identify the meta boxes, I can use that as well. I'm having trouble writing custom code because there is no ID on those custom taxonomy metaboxes. If they don't have ID natively, is there an option to give ID or something that can help identify the meta boxes?
Thanks for the code. If possible, I would like to use a different approach outside of REST API because I want to use the page template as a conditional factor. Are there any other approaches outside of REST API?
===>
Actually - as you are using block editor to edit your post that is why we need to use the REST API approach.
Fortunately - I found a workatound and I've adjusted the code added to "Custom Code" section with code snippet namely "remove-tax-metaboxes" as given under:
=> hidden link