Chèn khung bình luận Google + hay Google Plus vào blogger là một lợi thế cho Seo blog của bạn. Nó giúp việc chia sẻ, thảo luận nhanh và tiện hơn.
Cách làm khá đơn giản theo các bước sau:
Bước 1: Chọn tùy chỉnh đồng ý sử dụng tính năng nhận xét Google
Bước 2: Chọn ẩn trong cài đặt vị trí nhận xét
Bước 3: Vào mục Mẫu chọn Chỉnh sửa HTML tìm đến đoạn code sau:
<data:post.body/>
Bấm Ctrl + F và dán vào khung tìm kiếm trong theme, chú ý là lấy <data:post.body/> ở vị trí thứ 2 nhé vì trong theme có từ 4 đến 5 đoạn giống nhau.
Và tiến hành chèn ngay vào sau nó đoạn sau:
<script src="https://apis.google.com/js/plusone.js"></script>
<div
id="comments"></div>
<script>
gapi.comments.render('comments', {
href: window.location,
width: '600',
first_party_property: 'BLOGGER',
view_type: 'FILTERED_POSTMOD'
});
</script>
Similarly with Google+ Comments Counter:
<div id="commentscounter"></div>
<script>
gapi.commentcount.render('commentscounter', {
href: window.location
});
</script>
<script>
gapi.comments.render('comments', {
href: window.location,
width: '600',
first_party_property: 'BLOGGER',
view_type: 'FILTERED_POSTMOD'
});
</script>
Similarly with Google+ Comments Counter:
<div id="commentscounter"></div>
<script>
gapi.commentcount.render('commentscounter', {
href: window.location
});
</script>
Các bạn có thể thay đổi độ rộng khung cho phù hợp với mẫu theme blog mình bằng cách thay đổi độ rộng width: '600' tùy ý.
Lưu lại theme để test kết quả nhé. Nhatthienkt chúc các bạn thành công!
Social Plugin