• Resolved ace0930

    (@ace0930)


    If we register a new taxonomy by register_taxonomy, there is an option called show_admin_column.

    But how do we hide the column for the “category” which is an existing taxonomy added by WordPress by default, I don’t know how to hide it.

    I know a CSS display: none; will do the tricks, but I need a PHP way because I don’t want it to be generated.

    • This topic was modified 2 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Use the “manage_edit-post_columns” filter. (for the posts table, “edit-post” is the screen ID, sub in appropriate screen IDs as needed) Your callback is passed an array of columns in the table. Unset the element you want to hide. It’s best to hook with a large $priority arg to ensure other code has added all the columns before you attempt to remove anything.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide admin column for default category’ is closed to new replies.