Highlight unread posts on your blog.
Highlight unread posts on your blog.
Key features:
There’s a setting to determine when a post should be considered read. You can pick one of the following:
Functions available for theme developers:
Yes. Just set these two options:
* “A post only stays highlighted for N days after publishing” -> set the amount of days
* “Show all existing posts as new to new visitors” -> check
Try to enable the option “Check page markup before displaying a marker” (plugin options, advanced settings).
These two functions may be useful for developing WordPress themes.
mnp_is_new_post($post)
Returns true if a specific post is unread, otherwise false.
Parameters: $post (optional) – post ID or object.
mnp_new_posts_count($query)
Returns the total number of unread posts, optionally filtered.
Parameters: $query (optional) – WP_Query query string.
Example:
echo mnp_new_posts_count('cat=1');
This will show the number of unread posts in category with id = 1.