There’s a post count in the user page of the WordPress admin area. I have a custom post type events. Is there some hook I can use to add my event count to the post count, or else to add a column for the event count?
2 comments
Comments are closed.
There’s a post count in the user page of the WordPress admin area. I have a custom post type events. Is there some hook I can use to add my event count to the post count, or else to add a column for the event count?
Comments are closed.
There are 2 pretty undocumented hooks
'manage_users_custom_column'
and'manage_users_columns'
that you can use for the scope.They works in same manner of
'manage_posts_custom_column'
and'manage_posts_columns'
that are better documented, see Codex.So you can do something like this:
only be sure to use the correct post type slug in the SQL query inside
user_events_column_value
funcionhere’s an improvment to @gmazzap’s answer, including links to post list: