Highlighting Comments on Your WordPress Site Since Your Last Visit

Highlighting Comments on Your WordPress Site Since Your Last Visit

We get a lot of comments on our blog from our awesome members, but it can be hard to keep track of comments.

It can be a pain to subscribe to comments (more pesky emails landing in my inbox!), though after a few hits of the refresh button, new and old comments blur into one when discussion really takes off on a popular post.

Luckily, there’s a simple way for site admins to help their readers.

In today’s Weekend WordPress Project I’ll show you how to highlight new comments made on a post since a person’s last visit.

Comments feature image
Easily highlight comments to help returning visitors pick up where they left off.

Comments Since Last Visit

Developer John Parris has released a fantastic plugin on GitHub called Comments Since Last Visit.

Simply download the plugin, install and activate it. And that’s it. There are no settings to wade through or boxes to tick. The plugin works straight out of the box.

When you refresh your site, your new comments will look like this:

Highlighted comment
A highlighted comment, thanks to the Comments Since Last Visit plugin.

When you refresh your site again, comments will return to their usual styling:

Read comment
A read comment using the Twenty Fourteen theme.

The plugin adds a light blue background to new comments. While the plugin itself doesn’t offer any customizations, it’s easy enough to edit the plugin and change the styling of highlighted comments yourself.

In the plugins interface find the plugin and click “Edit.” Scroll down until you’re almost near the bottom and find this code:

Comments Since Last Visit
Add any highlighted comments styling directly into the plugin’s code.


As you can see, there is only one styling: the background is blue. With a little CSS, you can change the background to whatever color you like, add a border, change the font – style it however you like to match your site.

For each comment, Comments Since Last Visit adds the new-comment CSS class, which you can target in themes to control how new comments look.

If you’re interested in contributing to this plugin, check out Parris’ blog or the plugin’s page on GitHub.