Cara Membuat Related Post Dengan Gambar

Kini saya akan membahas tutorial mengenai cara membuat related post dengan gambar atau membuat postingan terkait thumbnail. Related post den...

Kini saya akan membahas tutorial mengenai cara membuat related post dengan gambar atau membuat postingan terkait thumbnail. Related post dengan gambar digunakan menampilkan postingan lain yg memiliki label atau tag sama lengkap dengan gambar, sehingga pengunjung blog dapat tertarik untuk mengklik dan membaca postingan lainnya. Widget ini juga dapat meningkatkan jumlah hits dari posting lama. Bagi yg ingin membuat widget related post bergambar, simak tutorial dibawah ini.
Tutorial Blogger dan Widget Blogger

CSS Related Post Gambar

  • Copy dan pastekan kode berikut di atas kode ]]></b:skin>
#related-posts{float:center;text-transform:none;height:20em;min-height:100%;padding-top:5px;padding-left:5px}
#related-posts img{padding:1px;border-radius: 4px;}
#related-posts h4{font-weight:400;text-transform:uppercase;padding:10px;background:#ff5848;color:#fff;border:1px solid #ff5848;border-radius:4px;font-size:14px!important;}
#related-posts a{margin:10px 0 0 0!important;color:#000;height:170px;width:100px;padding:10px;font-size:12px;}
#related-posts a:hover{height:170px;width:100px;color:#fff;background-color:#ff5848}.mobile-date-outer&gt;div{padding-left:10px}
  • Klik simpan

Script Related Post Gambar

  • Kemudian cari lagi kode </head> dan pastekan kode berikut di atasnya
<script type="text/javascript">
        //<![CDATA[
function related_results_labels_thumbs(e){for(var h=0;h<e.feed.entry.length;h++){var g=e.feed.entry[h];relatedTitles[relatedTitlesNum]=g.title.$t;try{thumburl[relatedTitlesNum]=g.gform_foot.url}catch(f){s=g.content.$t,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),thumburl[relatedTitlesNum]=-1!=a&&-1!=b&&-1!=c&&""!=d?d:"https://web.archive.org/web/20160211202635/http://2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1600/no-thumbnail.png"}50<relatedTitles[relatedTitlesNum].length&&
(relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,35)+"...");for(var l=0;l<g.link.length;l++)"alternate"==g.link[l].rel&&(relatedUrls[relatedTitlesNum]=g.link[l].href,relatedTitlesNum++)}}
function removeRelatedDuplicates_thumbs(){for(var e=[],h=[],g=[],f=0;f<relatedUrls.length;f++)contains_thumbs(e,relatedUrls[f])||(e.length+=1,e[e.length-1]=relatedUrls[f],h.length+=1,g.length+=1,h[h.length-1]=relatedTitles[f],g[g.length-1]=thumburl[f]);relatedTitles=h;relatedUrls=e;thumburl=g}function contains_thumbs(e,h){for(var g=0;g<e.length;g++)if(e[g]==h)return!0;return!1}
function printRelatedLabels_thumbs(){for(var e=0;e<relatedUrls.length;e++)relatedUrls[e]!=currentposturl&&relatedTitles[e]||(relatedUrls.splice(e,1),relatedTitles.splice(e,1),thumburl.splice(e,1),e--);var h=Math.floor((relatedTitles.length-1)*Math.random()),e=0;0<relatedTitles.length&&document.write("<h4>
"+relatedpoststitle+"</h4>
");for(document.write('<ul>');e<relatedTitles.length&&20>e&&e<maxresults;)document.write('
<li><a title="'+relatedTitles[h]+'"'),document.write(' href="'+relatedUrls[h]+'"><img class="related_img" width="100" height="100" src="'+thumburl[h]+'"/><br/><div id="related-title">
'+relatedTitles[h]+"</div>
</a></li>
"),h<relatedTitles.length-1?h++:h=0,e++;document.write("</ul>
");relatedUrls.splice(0,relatedUrls.length);thumburl.splice(0,thumburl.length);relatedTitles.splice(0,relatedTitles.length)}imgr=["https://web.archive.org/web/20160211202635/http://2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1600/no-thumbnail.png"];aBold=showRandomImg=!0;
summaryPost=400;numposts2=numposts1=summaryTitle=20;var relatedTitles=[],relatedTitlesNum=0,relatedUrls=[],thumburl=[];    //]]>
      </script>

HTML Related Post Gambar

  • Sekarang cari lagi kode <div class='post-footer'> dan pastekan kode dibawah ini diatasnya.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'><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_thumbs&amp;max-results=15&quot;' type='text/javascript'/></b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=5;
var relatedpoststitle=&quot;<h4>Related Post : <data:post.title/></h4>&quot;;
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
  </script></div></b:if>
  • Kemudian klik simpan

Pengaturan

Tulisan warna merah adalah berapa jumlah postingan secara yg akan ditampilkan, sedangkan tulisan warna biru adalah jumlah related post yg akan tampil. Jika ingin membuat tampil secara berurut samakan nilai tulisan warna merah dan biru. Sedangkan bila ingin muncul secara acak, nilai tulisan warna merah harus lebih besar dari tulisan warna biru. Demikianlah postingan saya mengenai cara membuat related post dengan gambar atau cara membuat postingan terkait dengan thumbnail. Semoga artikel ini dapat bermanfaat bagi kita semua.

COMMENTS

Name

Aceh,23,Adsense,8,BBM,3,Biography,1,Bitcoin,4,Blog,21,Blogger,12,Blogging,55,Business,14,Cerita,3,CPNS,1,Delicious,1,Design,1,DeviantART,1,Digg,1,Dollar,3,Dunia,13,Facebook,5,Flickr,1,Friendster,1,Gambar,2,Game,34,Gmail,1,Google+,4,Hosting,1,Inspirasi,2,Instagram,1,Internet,13,Interview,11,Kesehatan,2,LinkedIn,1,Makalah,7,Marketing,12,Meme,8,Money,3,Motivasi,2,MySpace,1,Outlook,1,Path,1,Pendidikan,10,Pengetahuan,4,Pinterest,1,Plugin,5,PNS,1,Reddit,1,Review,4,Seo,53,Smartphone,5,Social Media,38,Sukses,3,Sumatera Barat,16,Sumatera Utara,3,Templates,1,Tips,6,Toko Online,3,Top10,18,Tumblr,1,Tutorial,29,Tutorial Blog,146,Twitter,3,Umum,9,Vimeo,1,VK,1,Weebly,1,WhatsApp,1,Widget,55,Wisata,4,WordPress,14,Yahoo,1,Youtube,3,
ltr
item
Mas Da Bang: Cara Membuat Related Post Dengan Gambar
Cara Membuat Related Post Dengan Gambar
https://1.bp.blogspot.com/-g7SFRae-iwE/WkplUfEOc1I/AAAAAAAANgw/3NNS1tUSOmY9FxL-_dkKCQVZ-4N0Pql_gCLcBGAs/s1600/Tutorial-Blog.png
https://1.bp.blogspot.com/-g7SFRae-iwE/WkplUfEOc1I/AAAAAAAANgw/3NNS1tUSOmY9FxL-_dkKCQVZ-4N0Pql_gCLcBGAs/s72-c/Tutorial-Blog.png
Mas Da Bang
https://blog.itapuih.com/2018/12/cara-membuat-related-post-dengan-gambar.html
https://blog.itapuih.com/
https://blog.itapuih.com/
https://blog.itapuih.com/2018/12/cara-membuat-related-post-dengan-gambar.html
true
2732475762120586724
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy