{"id":127957,"date":"2014-04-12T11:30:00","date_gmt":"2014-04-12T15:30:00","guid":{"rendered":"http:\/\/premium.wpmudev.org\/blog\/?p=127957"},"modified":"2014-05-30T01:49:31","modified_gmt":"2014-05-30T05:49:31","slug":"highlighting-comments-on-your-wordpress-site-since-your-last-visit","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/highlighting-comments-on-your-wordpress-site-since-your-last-visit\/","title":{"rendered":"Highlighting Comments on Your WordPress Site Since Your Last Visit"},"content":{"rendered":"<p>We get a lot of comments on our blog from our awesome members, but it can be hard to keep track of comments.<\/p>\n<p>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.<\/p>\n<p>Luckily, there\u2019s a simple way for site admins to help their readers.<\/p>\n<p>In today\u2019s Weekend WordPress Project I\u2019ll show you how to highlight new comments made on a post since a person\u2019s last visit.<\/p>\n<p><figure id=\"attachment_128063\" class=\"wp-caption aligncenter\" data-caption=\"true\"><a rel=\"lightbox[127957]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/comments-feature-image.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"size-ratio-large wp-image-128063\" alt=\"Comments feature image\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/comments-feature-image-700x218.jpg\" width=\"700\" height=\"218\" \/><\/a><figcaption class=\"wp-caption-text\">Easily highlight comments to help returning visitors pick up where they left off.<\/figcaption><\/figure><br \/>\n<\/p>\n<h2>Comments Since Last Visit<\/h2>\n<p><span style=\"line-height: 24px;\">Developer John Parris has released a fantastic plugin on GitHub called <a title=\"Comments Since Last Visit\" href=\"http:\/\/www.johnparris.com\/wordpress-plugins\/comments-since-last-visit\/\" target=\"_blank\">Comments Since Last Visit<\/a>.<\/span><\/p>\n<p>Simply download the plugin, install and activate it. And that&#8217;s it. There are no settings to wade through or boxes to tick. The plugin works straight out of the box.<\/p>\n<p>When you refresh your site, your new comments will look like this:<\/p>\n<figure id=\"attachment_128055\" class=\"wp-caption aligncenter\" data-caption=\"true\"><a rel=\"lightbox[127957]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/highlighted-comment.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-128055\" alt=\"Highlighted comment\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/highlighted-comment.png\" width=\"404\" height=\"328\" \/><\/a><figcaption class=\"wp-caption-text\">A highlighted comment, thanks to the Comments Since Last Visit plugin.<\/figcaption><\/figure>\n<p>When you refresh your site again, comments will return to their usual styling:<\/p>\n<figure id=\"attachment_128064\" class=\"wp-caption aligncenter\" data-caption=\"true\"><a rel=\"lightbox[127957]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/read-comment.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-128064\" alt=\"Read comment\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/read-comment.png\" width=\"416\" height=\"349\" \/><\/a><figcaption class=\"wp-caption-text\">A read comment using the Twenty Fourteen theme.<\/figcaption><\/figure>\n<p>The plugin adds a light blue background to new comments. While the plugin itself doesn&#8217;t offer any customizations, it&#8217;s easy enough to edit the plugin and change the styling of highlighted comments yourself.<\/p>\n<p>In the plugins interface find the plugin and click &#8220;Edit.&#8221; Scroll down until you&#8217;re almost near the bottom and find this code:<\/p>\n<p><figure id=\"attachment_128056\" class=\"wp-caption aligncenter\" data-caption=\"true\"><a rel=\"lightbox[127957]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/comments-since-last-visit.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-128056\" alt=\"Comments Since Last Visit\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2014\/04\/comments-since-last-visit.png\" width=\"393\" height=\"212\" \/><\/a><figcaption class=\"wp-caption-text\">Add any highlighted comments styling directly into the plugin&#8217;s code.<\/figcaption><\/figure><br \/>\n<br \/>\nAs 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 \u2013 style it however you like to match your site.<\/p>\n<p>For each comment, <a title=\"Comments Since Last Visit\" href=\"http:\/\/www.johnparris.com\/wordpress-plugins\/comments-since-last-visit\/\" target=\"_blank\">Comments Since Last Visit<\/a> adds the <em>new-comment<\/em> CSS class, which you can target in themes to control how new comments look.<\/p>\n<p>If you&#8217;re interested in contributing to this plugin, check out <a title=\"Comments Since Last Visit\" href=\"http:\/\/www.johnparris.com\/wordpress-plugins\/comments-since-last-visit\/\" target=\"_blank\">Parris&#8217; blog<\/a> or the <a title=\"Comments Since Last Visit\" href=\"https:\/\/github.com\/mindctrl\/comments-since-last-visit\/\" target=\"_blank\">plugin&#8217;s page on GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s Weekend WordPress Project we&#8217;ll look at highlighting new comments made on a post since a person\u2019s last visit.<\/p>\n","protected":false},"author":164650,"featured_media":128063,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[9798],"tutorials_categories":[],"class_list":["post-127957","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-weekend-wordpress-projects"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/127957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/164650"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=127957"}],"version-history":[{"count":0,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/127957\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/128063"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=127957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=127957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=127957"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=127957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}