Good morning WP fans !
I try to find a theme for a .wordpress blog (it's hosted there) What I would like to have is a "notification system", like for example to notify the visitor that there are updated/unread posts in a category since his last visit/refresh/whatever. Like for example with a bold number inside brankets next to a category. Or with ANY other way if that is possible.
Do you know of any theme that has that functionality ?
Thanks !!!
Good morning WP fans !
I try to find a theme for a .wordpress blog (it's hosted there) What I would like to have is a "notification system", like for example to notify the visitor that there are updated/unread posts in a category since his last visit/refresh/whatever. Like for example with a bold number inside brankets next to a category. Or with ANY other way if that is possible.
Do you know of any theme that has that functionality ?
Thanks !!!
What you're looking for is a combination of
Of course you will have to couple them yourself to suit your needs and requirements. As far as I know there is no such plugin for WordPress.
Additional ones that you may want to dig in are:
Again, none of them will work just like you're imagining it, probably, so you'll have to write your own using the concepts those plugins use.
That's a good question and yes, I am aware it's old! However, I was looking for the same thing and came across this solution, so thought it helpful to add it here. The code is rather old, so I am not sure if it needs updating to suit current WP standard:
Reproduced from https://www.wpbeginner/wp-themes/how-to-highlight-new-posts-for-returning-visitors-in-wordpress/
--
The following code looks for a cookie called lastvisit when a user arrives on your website. If it does not find the cookie, then it sets the cookie with the current time.
If it finds the cookie, then it adds "New" to the title of the articles published since user's last visit.
Notice that there is a new-article class in the tag around "New". You will use this class to style the text using CSS.
Copy and paste this code in your theme's functions.php file (or create a plugin).
function wpb_lastvisit_the_title ( $title, $id ) {
if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return
$title;
// if no cookie then just return the title - you could change this if required
if ( !isset($_COOKIE['lastvisit']) || $_COOKIE['lastvisit'] == '' ) return $title;
$lastvisit = $_COOKIE['lastvisit'];
$publish_date = get_post_time( 'U', true, $id );
if ($publish_date > $lastvisit) $title .= '<span class="new-article">New</span>';
return $title;
}
add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);
// Set the lastvisit cookie
function wpb_lastvisit_set_cookie() {
if ( is_admin() ) return;
$current = current_time( 'timestamp', 1);
setcookie( 'lastvisit', $current, time()+60+60*24*7, COOKIEPATH, COOKIE_DOMAIN );
}
add_action( 'init', 'wpb_lastvisit_set_cookie' );
We used the following CSS. Simply copy and paste it in your theme or child theme's stylesheet and modify it as per your requirements.
.new-article {
background: #feffdd;
padding: 3px;
border: 1px solid #eeefd2;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-left:5px;
font-size: small;
font-weight: bold;
}
RE bold number in brackets - I am not sure how to achieve that part, but you could possibly investigate the plugin: Better Notifications for WordPress https://wordpress/plugins/bnfw/