Thursday, February 13, 2020

How To Add Show/Hide Comment in Blogger

How To Add Show/Hide Comment in Blogger

How To Add Show/Hide Comment in Blogger
Thursday, February 13, 2020
Today we will teach you how to show / hide the comments of the blogger website. 

All of you can show the show on your website by  onclick event.

Before telling you how to Add Show/Hide comment , I am telling you its benefits.

Benefits Of Show/Hide Comments In Bloggers

You have a lot of benefit by adding show / head comment to your website.

This will make your website look very good. The comment form in your EBSEye looks a bit bad if you use the show / hide comment, then your website will start to look good because the comment form gets hidden, which makes your website look good.

Due to this, any problem will not come in your website, as you will not have any decrease in the speed of the website.

Read - Increase Blogger Website Speed

So, now we tell you how you will also add show / hide comment to your website.

How To Add Show/Hide Comment In Blogger

#Step1. First of all, you have to open and login.

#Step2. After that you have to go to the theme section.  And you have to search there 
<div class='comments' id='comments'> .

#Step3. After that you have to replace the code below in place of
<div class='comments' id='comments'> .

<a href="#" id="comments-show" class="showcontent" onclick="showComm('comments');return false;">Show comments</a>
<div class='clear'/>
        <div class='comments hide-content' id='comments'>
<a href="#" id="comments-hide" class="hiddencontent" onclick="showComm('comments');return false;">Hide comments</a>
<div class='clear'/>

#Step4. Now you have to search for </ style> in your blogger template.  After that you have to paste the below code code just above it.

/* Show and Hide Comments */
a.showcontent,#comments a.hiddencontent{display:block;text-decoration:none;position:relative;color:#fff;font-weight:700;font-size:15px;padding:12.5px 0;background:#5593f0;border:2px solid;border-radius:5px;text-align:center;margin:30px auto;letter-spacing:1px;transition:all .3s}
#comments a.hiddencontent {background:#fff;color:#acb3b8;transition:all .3s}
#comments a.hiddencontent:hover{background:#acb3b8;color:#fff;}

Now you have to search for <body> in your Blogger template and paste the code below just above it.

<script type='text/javascript'>
// Show and Hide Comments
function showComm(e){document.getElementById(e)&&("none"!=document.getElementById(e+"-show").style.display?(document.getElementById(e+"-show").style.display="none",document.getElementById(e).style.display="block"):(document.getElementById(e+"-show").style.display="block",document.getElementById(e).style.display="none"))};

Final Word : Friends, I have told you to show / hide the comment, you must also share my post to support me.
How To Add Show/Hide Comment in Blogger
4/ 5

Berlangganan via email

Suka dengan postingan di atas? Silakan berlangganan postingan terbaru langsung via email.

Load comments