1

For a plugin I have created a new custom taxonomy for attachments using the function register_taxonomy() and parameters like "show_admin_column". When this parameter is set to true, it shows the category column as expected. I also used register_taxonomy_for_object_type() to register the existing 'category' taxonomy to the same attachment post_type. As the "show_admin_column" for 'category' is also set to true, it shows the category column as expected.

Depending on the setting of an option in my plugin, I would like to show only one of the taxonomies. Not displaying the custom taxonomy is no problem, just define the value of "show_admin_column" to false when using register_taxonomy().

However, my question now is how do I switch the value to false for the 'category' taxonomy as the function register_taxonomy_for_object_type() doesn't seem to have any arguments.

I would like to have a function like set_taxonomy_args($taxonomy, args).

Any suggestions on how to achieve this?

1

Sorry, but I think I have searched for the wrong question. It seems like the answer to my question can be found in How to modify a taxonomy that's already registered.

Thanks to @helgatheviking !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.