notifications - Looking for a theme to show unreadupdated posts since last visit or like that

admin2025-06-02  3

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 !!!

Share Improve this question asked Oct 22, 2011 at 9:56 labmicelabmice 1032 bronze badges 5
  • Does your WordPress subscription allow you to install plugins and third-party themes? – soulseekah Commented Oct 22, 2011 at 10:12
  • It's a normal, free wordpress blog. So I guess i am allowed to install the free themes from their repository ? Or not ? – labmice Commented Oct 22, 2011 at 10:25
  • Free themes - yes, notification plugins (especially custom tailored ones) - no. – soulseekah Commented Oct 22, 2011 at 10:29
  • Do you know any plugin (even not free) that does something like that? I might hosted my WP blog to a server and buy the plugin. – labmice Commented Oct 22, 2011 at 10:32
  • just found P2 theme (from wordpress team). Seems interesting... – labmice Commented Oct 22, 2011 at 10:37
Add a comment  | 

2 Answers 2

Reset to default 1

What you're looking for is a combination of

  • KB New Posts, which shows visitors posts that they have not yet read
  • Smart Unread Comments
  • and some notification bar system, one of these four may make a good choice

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:

  • WP Since Last Visit Plugin
  • Published Articles Since Last Visit

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/

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748866532a314375.html

最新回复(0)