Count user posts and store the number for later use
You can use update_user_meta() to add information to a user’s meta fields, and count_user_posts() to get an initial count. So, for instance: <?php add_action( ‘new_to_publish’, ‘wpse96358_author_count’ ); add_action( ‘draft_to_publish’, ‘wps396358_author_count’ ); function wpse96358_author_count() { global $post; // get initial count $single = true; $author_count = get_user_meta( $post->post_author, ‘author_count’, $single ); if ( strlen( $author_count ) … Read more