Lượt xem bài viết là hiển thị số lượt xem trên các bài viết của bạn. Và chắc chắn có lợi ích là làm cho khách biết bài viết nào được xem nhiều nhất để họ biết rằng bài viết đó thực sự hữu ích cho họ.
{tocify} $title={Nội dung bài viết}
Các bước để hiển thị số lượt xem bài viết
Chỉ có ba bước đơn giản để thêm bộ đếm lượt xem bài đăng trong blogger. Tất cả các bước được giải thích rất rõ ràng dưới đây. Vui lòng làm theo các bước một cách cẩn thận vì nếu có một lỗi nhỏ, bộ đếm lượt xem bài đăng sẽ không hoạt động.
Bước 1. Thêm jQuery & Font Awesome
Lưu ý: Đây là bước tùy chọn, nếuFont Awesome & jQueryđã được cài đặt trên blog của bạn thì đừng thêm các mã này vào blog của bạn. {alertError}
Tìm mã <head> trên blog của bạn và đặt mã sau ngay sau mã <head>
<!-- Jquery Library and Font Awesome CDN --><script src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js'/> <link crossorigin='anonymous' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css' integrity='sha256-46qynGAkLSFpVbEBog43gvNhfrOj+BmwXdxFgVK/Kvc=' rel='stylesheet'/> {codeBox}
Bước 2. Thêm JavaScript
Bây giờ hãy tìm kiếm mã </body> và dán các mã sau lên trên nó.
<script type='text/javascript'> jQuery.getScript("//cdn.firebase.com/js/client/2.3.2/firebase.js").done(function(){$.each($(".post-view[data-id]"),function(e,a){var i=$(a).parent().find("#postviews").addClass("view-load"),t=new Firebase("https://post-view-st.firebaseio.com/pages/id/"+$(a).attr("data-id"));t.once("value",function(e){var o=e.val(),d=!1;null==o&&((o={}).value=0,o.url=window.location.href,o.id=$(a).attr("data-id"),d=!0),i.removeClass("view-load").text(o.value),o.value++,"/"!=window.location.pathname&&(d?t.set(o):t.child("value").set(o.value))})})}); </script> {codeBox}
Bước 3. Thêm mã HTML
Thêm các mã sau ở trên vào <data:post.body/>.
Có thể có nhiều hơn một mã <data:post.body/> trong mẫu, vì vậy hãy thử từng mã một và xem nó có hoạt động không.
<b:if cond='data:view.isPost'><span class='post-view' expr:data-id='data:post.id'><i class="fa fa-eye" aria-hidden="true"></i> <span class='view-load' id='postviews'><i class='fas fa-spinner fa-pulse faa-fast'/></span> Views</span></b:if> {codeBox}
Đây là tất cả về việc thêm bộ đếm lượt xem bài đăng trong blogger. Tôi hy vọng bài viết này là rất hữu ích cho bạn. Nếu có điều gì đó không rõ ràng hoặc có bất kỳ câu hỏi nào hãy để lại bình luận bên dưới.
Copyright © ReLub.Net
đang cần luôn
Trả lờiXóaharshitj183,Harshit Jaiswal,jee, यूपी बोर्ड 2021, परीक्षा यूपी बोर्ड ,how to,why,what is,News ,Spacial,harshitj183, harshit jaiswal, jee, यूपी बोर्ड 2021, परीक्षा यूपी बोर्ड, how to, why, what is, news spacial, jokes, math, physics, chemistry, english, grammar, book, comic, story, blog, recipe, g.k. note, घरेलू नुस्खे, magazine, carrier, bussiness, article, free, download, harshit, jaiswal, dust, pdf download, online, exam, saurabh mukherje, धन संपत्ति का मनोविज्ञान pdf, धन, संपत्ति, मनोविज्ञान, king, anga, diamonds, pdfdrive, dhan-sampatti, false allies manu pillai, रामहि प्रेम समेत लखि, hindutva, भूकंप से लाभ और हानि, allen, new, solution, solve, handwritten, oxford, current, exercise, top, lakshya batch, physics wallah 174, सुपर कमांडो ध्रुव, best, today, update, now, india, asia, up, wise, short, long, biggest, hurry, sachin bhaske, unfaithful, web series, mathematics, @, 183, hj, @hj183, punjabi, ipl, game, play, fast, fundamentals, electric, circuits, class, mcq, memes, quotes, video, mp3, lyrics, udit udaygiri manch par raghuvar, bal patang, calendar, best black friday deals 2021translatione, movies, malitanyo.website, olympics,Jokes,Math,Physics,Chemistry,English,Grammar,Book,Comic,Story,Blog,Recipe,G.K. Note,घरेलू नुस्खे,magazine,carrier,Bussiness,article'
Trả lờiXóahttps://harshitj183.blogspot.com
Hi,I provide you best educational content, tips and trick that increase your knowledge .I will guide and help you in study. by:» @harshitj183 Harshit Jaiswal (@harshitj183)
harshitj183,Harshit Jaiswal,jee, यूपी बोर्ड 2021, परीक्षा यूपी बोर्ड ,how to,why,what is,News Spacial,Jokes,Math,Physics,Chemistry,English,Grammar,Book,Comic,Story,Blog,Recipe,G.K. Note,घरेलू नुस्खे,magazine,carrier,Bussiness,article'
https://harshitj183.blogspot.com
Hi,I provide you best educational content, tips and trick that increase your knowledge .I will guide and help you in study. by:» @harshitj183 Harshit Jaiswal (@harshitj183)
nếu anh không phiền, sửa giúp mình liên kết của em với:
Trả lờiXóaName: Yuzu Tips
URL: https://www.yuzutips.xyz/
Description: A girl who is passionate about Blogger - Yuzu website shares good tips
em vẫn đặt liên kết của anh ở: https://www.yuzutips.xyz/p/partner-sites.html?m=1
cảm ơn anh ạ :3
https://ngoviminhhieupro.blogspot.com/
Trả lờiXóaTên:Ngô Vi Minh Hiếu Blog
Mô tả:Chia sẻ kiến thức, tư duy sáng tạo!
Xin chào,mặc dù mình đã cảnh báo các blog fake,nhưng vẫn diễn ra các hành vi fake,nếu ai có đặt liên kết với blog này:https://ngoviminhhieupro.blogspot.com ,hay thấy blog này comment thì hãy đánh dấu spam,xin vui lòng gỡ xuống khỏi friends blog vì đây là blog fake.Mình chỉ đặt liên kết với blog duy nhất:https://www.ngoviminhhieu.xyz/
Xóabài như cặc
Trả lờiXóa