April 6, 202512:56:23 PM

Hướng dẫn chèn bài viết liên quan vào giữa bài viết Blogspot

Hướng dẫn chèn bài viết liên quan vào giữa bài viết Blogspot
để thực hiện được các bạn làm theo các bước như sau
 Vào Blogger => mẫu =>Chỉnh sửa HTML


Thêm trước thẻ ]]></b:skin>
/* NguyenHungIT */
.qc-header-post { float:left; width:100%; }
.post-ads { float:left; margin:0 10px 10px 0; position:relative; }
@media (max-width:600px) {
.post-ads { width:100%; } .post-right { margin-left:0 !important; width:100%; float:left; } 
.post-body img { transition:all .3s; max-width:100%; }
.post-right { margin:0 0 0 310px; padding:0 0 10px; }
p.post-excerpt { margin:0; padding:10px; background-color:#ECF0F1; font-size:17px; line-height:1.5em; color:#F88C00; }
#related-posts { margin:10px 0; }
#related-posts ul li { list-style-type:none; color:#F88C00; font-size:16px; line-height:22px; max-height:22px; overflow:hidden; }
#related-posts ul li a { color:#006250; }
#related-posts ul li a:hover { color:#F88C00; }
#related-posts h4 { color:#E74C3C; border-bottom:1px dashed #E74C3C; padding:5px 0; font-size:18px; margin-bottom:5px; }
#related-posts ul { margin-left:0; }
#related-posts .fa { margin-right:5px; }
#random-posts img { border-radius:1000px; border:5px solid; color:#dddddd; float:left; margin-right:5px; width:75px; height:75px; background-color:#F5F5F5; padding:3px; transition:all 0.2s linear 0s; }
#random-posts img:hover { opacity:0.6; }
ul#random-posts { list-style-type:none; padding:0; }
#random-posts a { font-size:12px; text-transform:uppercase; padding:3px 0 5px; }
#random-posts a:hover { text-decoration:none; }
.random-summary { font-size:11px; background:none; padding:5px; margin-right:8px; }
#random-posts li { margin-bottom:10px; border-bottom:1px solid #EEEEEE; padding:4px; }

Thêm đoạn code dưới, trước thẻ </head>

<!--NguyenHung Related-->
<b:if cond='data:blog.pageType == &quot;item&quot;'> <script type='text/javascript'> //<![CDATA[ <!-- Related Posts -->; var titles= new Array(); var titlesNum=0; var urls= new Array(); var time= new Array(); function related_results_labels(_0x5397x1d) { for(var _0x5397x1e=0; _0x5397x1e<_0x5397x1d[_0x9bf9[26]][_0x9bf9[25]][_0x9bf9[4]]; _0x5397x1e++) { var _0x5397x1f=_0x5397x1d[_0x9bf9[26]][_0x9bf9[25]][_0x5397x1e]; titles[titlesNum]=_0x5397x1f[_0x9bf9[20]][_0x9bf9[29]]; for(var _0x5397x20=0; _0x5397x20<_0x5397x1f[_0x9bf9[30]][_0x9bf9[4]]; _0x5397x20++) { if(_0x5397x1f[_0x9bf9[30]][_0x5397x20][_0x9bf9[31]]==_0x9bf9[32]) { urls[titlesNum]=_0x5397x1f[_0x9bf9[30]][_0x5397x20][_0x9bf9[13]]; time[titlesNum]=_0x5397x1f[_0x9bf9[39]][_0x9bf9[29]]; titlesNum++; break } } } } function removeRelatedDuplicates() { var _0x5397x1e= new Array(0); var _0x5397x1d= new Array(0); e= new Array(0); for(var _0x5397x20=0; _0x5397x20<urls[_0x9bf9[4]]; _0x5397x20++) { if(!contains(_0x5397x1e,urls[_0x5397x20])) { _0x5397x1e[_0x9bf9[4]]+=1; _0x5397x1e[_0x5397x1e[_0x9bf9[4]]-1]=urls[_0x5397x20]; _0x5397x1d[_0x9bf9[4]]+=1; _0x5397x1d[_0x5397x1d[_0x9bf9[4]]-1]=titles[_0x5397x20]; e[_0x9bf9[4]]+=1; e[e[_0x9bf9[4]]-1]=time[_0x5397x20] } }; titles=_0x5397x1d; urls=_0x5397x1e; time=e } function printRelatedLabels(_0x5397x20) { var _0x5397x14=_0x5397x20[_0x9bf9[6]](_0x9bf9[63]); if(_0x5397x14!= -1) { _0x5397x20=_0x5397x20[_0x9bf9[64]](/\?m=0/g,_0x9bf9[8]) }; for(var _0x5397x1e=0; _0x5397x1e<urls[_0x9bf9[4]]; _0x5397x1e++) { if(urls[_0x5397x1e]==_0x5397x20) { urls[_0x9bf9[65]](_0x5397x1e,1); titles[_0x9bf9[65]](_0x5397x1e,1); time[_0x9bf9[65]](_0x5397x1e,1) } }; var _0x5397x1d=Math[_0x9bf9[24]]((titles[_0x9bf9[4]]-1)*Math[_0x9bf9[23]]()); var _0x5397x1e=0; document[_0x9bf9[62]](_0x9bf9[66]); if(titles[_0x9bf9[4]]==0) { document[_0x9bf9[62]](_0x9bf9[67]) } else { while(_0x5397x1e<titles[_0x9bf9[4]]&&_0x5397x1e<20&&_0x5397x1e<maxresults) { if(_0x5397x14!= -1) { urls[_0x5397x1d]=urls[_0x5397x1d]+_0x9bf9[63] }; document[_0x9bf9[62]](_0x9bf9[68]+urls[_0x5397x1d]+_0x9bf9[69]+time[_0x5397x1d][_0x9bf9[7]](8,10)+_0x9bf9[70]+time[_0x5397x1d][_0x9bf9[7]](5,7)+_0x9bf9[70]+time[_0x5397x1d][_0x9bf9[7]](0,4)+_0x9bf9[60]+titles[_0x5397x1d]+_0x9bf9[71]); if(_0x5397x1d<titles[_0x9bf9[4]]-1) { _0x5397x1d++ } else { _0x5397x1d=0 }; _0x5397x1e++ } }; document[_0x9bf9[62]](_0x9bf9[72]); urls[_0x9bf9[65]](0,urls[_0x9bf9[4]]); titles[_0x9bf9[65]](0,titles[_0x9bf9[4]]) } //]]> </script> </b:if>
<!--kết thúc NguyenHung Related-->

Tìm đoạn sau
<a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != &quot;true&quot;'>,</b:if>
thêm code dưới, vào giữa thẻ </div> & </b:if>

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div class='qc-header-post'>
<div class='post-ads'>
<!-- Start of adf.ly banner code --><a href="http://adf.ly/?id=11000775"><img border="0" src="https://cdn.adf.ly/images/banners/adfly.300x250.1.gif" width="300" height="250" title="AdF.ly - shorten links and earn money!" /></a>
<!-- End of adf.ly banner code -->
</div>
<div class='post-right'>
<p class='post-excerpt'><data:post.snippet/></p>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<h4>Bài viết liên quan</h4>
<b:loop values='data:post.labels' var='label'>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels&quot;' type='text/javascript'/></b:loop><script type='text/javascript'>var maxresults=5;removeRelatedDuplicates();printRelatedLabels(&quot;<data:post.url/>&quot;);</script></div></b:if></div></div><div style='clear:both'/></b:if>

và cuối cùng các bạn lưu lại và thưởng thức thôi

Hướng dẫn chèn bài viết liên quan vào giữa bài viết Blogspot, chèn bài viết liên quan vào giữa bài viết blogspot,code chèn bào viết liên quan vào blog

Post a Comment

Post a Comment

  1. Ad ơi giúp với

    Không tìm ra đoạn này ","

    Link: http://www.123seo.vn/

    ReplyDelete

► Comments Lịch Sự - Không Spam.
► Viết Tiếng Việt Có Dấu - Giữ lịch sự, văn hóa.
► Tích vào ô Thông báo cho tôi để nhận thông báo phản hồi.
► Bình luận của bạn sẽ được giải đáp sớm nhất bạn nhớ check mail để xem phản hồi từ mình và các bạn khác nhé

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Post a Comment

  1. Ad ơi giúp với

    Không tìm ra đoạn này ","

    Link: http://www.123seo.vn/

    ReplyDelete

► Comments Lịch Sự - Không Spam.
► Viết Tiếng Việt Có Dấu - Giữ lịch sự, văn hóa.
► Tích vào ô Thông báo cho tôi để nhận thông báo phản hồi.
► Bình luận của bạn sẽ được giải đáp sớm nhất bạn nhớ check mail để xem phản hồi từ mình và các bạn khác nhé

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Author Name

yes

Contact Form

Name

Email *

Message *

Powered by Blogger.