Notification texts go here. Contact Us Buy Now!
$10.00
10
$000

Get your blog ready With details you won't find anywhere.

create a simple 'Recent Comments' Widget for Blogspot

abdalrahman
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated

Your blog will show high or low engagement depends on the blog's activities. One of them is the number of comments in your blog. So you want to show it on the blog, how do you do it? Today I will show you how to create a new comment widget for blogspot.


HOW TO CREATE NEW WIDGET COMMENTS FOR BLOGSPOT


View DEMO :

Demo

To do this you just need to do the following steps:

Step 1: Select Layout -> Add HTML/JavaScrip Widget

Step 2: Insert the following code:

<style>.nxmoi{color: #ccc;}.nxmoi li{margin:0;padding:10px;border-left: 2px solid #ff4040;}.nxmoi li:before {content:"";width: 12px;height: 12px;display: block;border: 3px solid #09f;border-radius: 50%;float:left;left:15px;position: absolute;background:#fff;}.nxmoi li:hover:before{background:#F48FB1}.nxmoi span a{color:#09f;font-weight:600;transition: color .3s;}.nxmoi span a:hover{color:#ccc;transition: color .3s;}.nxmoi span {color:#aaa}</style><script>//<![CDATA[var sl_nhanxet = 4,    kt_nhanxet = 50;// Recent Commentfunction nhanxetmoi(json) {    var entry, commurl, commsum;    document.write('<ul>');    for (var i = 0; i < sl_nhanxet; i++) {        entry = json.feed.entry[i];        if (i == json.feed.entry.length) break;        for (var k = 0; k < entry.link.length; k++) {            if (entry.link[k].rel == 'alternate') {                commurl = entry.link[k].href;                break;            }        }        commsum = ("content" in entry) ? entry.content.$t : ("summary" in entry) ? entry.summary.$t : "";        commsum = commsum.replace(/<.*?>/g, "");        if (commsum.length > kt_nhanxet) commsum = commsum.substring(0, kt_nhanxet) + "...";        document.write('<li><span><a href="' + commurl + '" rel="nofollow">' + entry.author[0].name.$t + ':</a></span> <span>' + commsum + '</span></li>');    }    document.write('</ul>');}//]]></script><script src="/feeds/comments/summary?alt=json-in-script&amp;callback=nhanxetmoi"></script>

Note :

Replace sl_nhanxet=4, to what you want ( eg : sl_nhanxet=5, ) kt_nhanxet=50; do what you want ( eg : kt_nhanxet=50; )


Step 3: Save and see the result

Read Also

Getting Info...

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.