A simple way to achieve this would be to do something like the following;
<?php
$user_id = get_current_user_id();
$post_count = count_user_posts($user_id);
if ($post_count >= 50 && $post_count < 100) {
// Congratulations you have submitted 50 posts!
} elseif ($post_count >= 100) {
// etc etc...
} else {
// do something else, or nothing.
}
?>
You can place this within your header.php file, or for that matter in any template file should you choose to display this information elsewhere as this can run from out-side of your post loop.
WordPress API resources:
Related Posts:
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Author post count in category
- Count posts within a custom post type and specific taxonomy and terms?
- How to Display a List of Users Who Have Made at Least 1 Post?
- Hook that get’s triggered when the author of a post is changed
- the_author() returns empty string
- Prevent Authors from viewing each others Posts
- How to show list of posts by author and category?
- How to cache a shortcode functions output?
- How to add editor’s name to entry meta byline?
- Different permalink for posts and authors
- How to display posts by current user/author in a custom page template?
- Count posts in category including child categories
- Restrict the Number of Posts an Author can Publish (over time)?
- Search posts by post author name
- Get the user type of an author
- Count singular post views automatically
- Show the title of the latest post by author
- Find most recent authors
- Show author post count in sidebar – Variable
- Get the author of the latest revision
- Filter posts by author and category simultaneously
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Network wide post count (WP Multisite)
- Get all posts by post_author
- Show that current post is number X out of X
- Multiple authors for single post without plugin
- Limit number of posts a user can make per minute?
- Authors in menu, template list post by author
- Author must complete profile info before they can publish a post?
- Double count view in archive.php
- Count to how many categories a post belongs to
- Count search results in heading
- How to hide first gallery for every post?
- How can I show wordpress posts based on author?
- Show info to author only
- Auto “expire” all of an authors posts on spcific date
- How to get the user meta data for a post?
- Display Published Posts Count for Certain Time Period
- How can I show many posts an author has per week?
- How to give capability (publish contributors posts) to author role?
- Whitelist Author of Private Post
- Show posts count for Categories and Tags in wp_nav_menu
- How do I retrieve a users’ last 5 posts?
- How to add category post count in main navigation menu [closed]
- Show comment number per author per day
- Count number of posts of current month
- (solved) getting post author’s user role
- Change all author links in Blog roll
- Howto show comment count by post in post?
- Display author’s name and avatar in post’s sidebar
- Counter is skipping post when I still want it visible [closed]
- If contributor has published 2 or more posts then show otherwise hide
- Change post author without using wp_update_post()
- Count several post tags
- Is it possible to lock all new and existing WordPress posts to one specific author?
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- Restrict displaying posts to the poster itself (in Back-end)
- Send email to author of post on post submission
- How can I set a maximum allowed post size and number of posts submitted?
- Get x recent posts by author?
- Change Author Name to Sitename on Frontend
- Echo the number of posts being displayed
- Exclude a category of posts in author template
- Author Avatar as default first image
- Cannot select certain authors for posts after import
- Count user posts and store the number for later use
- Display custom post counts for author , not default posts
- Send email to admin with post author
- why the posts queried from sql is more than those showed on the page?
- Prevent 404 of Author pages without posts
- Count the total views of all user posts published
- Restricting displayed posts to posts from only select authors
- Display post by Random Authors on Page Refresh
- Show post count in custom taxonomy page
- Count singular post views automatically
- What permissions does a role need for the user to be assigned as the author of a post?
- How to count posts in tags within time limit
- Counting Posts by Category
- Display number of post published every day
- count_posts to a standalone link
- Changing the Category for all posts of an Author
- List of authors posts minus very latest
- show latest authors blog post
- How to mark every 3rd post
- Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)
- Create a Page Template Which Displays All Posts by Current User
- Set the limit to allow author when make post!
- How to get single post by one author?
- How to limit the number of posts a user can publish based on user type
- Notify Author of the post if admin deletes his post and perform some function
- ho can I get the number of the current post instead of the post id?
- post_count not working
- Echo author slug in post edit page
- Adding Count Post in Page
- How can I add Author’s phone number to wp profile and make it appear in wp-admin/edit.php columns
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- Display post count on archive page in reverse order
- users followin the blog post author