Is it possible to override default update_count_callback for category? The default function counts published posts while I want to count private posts. I do not want to register a new taxonomy.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
||||
|
|
|
In your update_count_callback function do a check for $post->post_status and don't increment your count if post_status is not private. See this excellent answer on writing a custom update_count_callback callback function. Edit:Misread the question. To override the existing default for the category taxonomy you can create a function that overrides the global $wp_taxonomies variable
|
|||||
|