Membuat Related Post Dengan Gambar pada Blog

Letakkan kode di bawah ini tepat di atas kode </head> :


<!--Related Posts with thumbnails Scripts and Styles Start-->
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type='text/css'>
#related-posts {
float:center;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}

#related-posts h2{
font-size: 13px;
font-weight: bold;
color: black;
margin-bottom: 5px;
margin-top: 0em;
padding-top: 0em;
}

#related-posts a{
color:black;
}

#related-posts a:hover{
color:black;
}
#related-posts  a:hover {
background-color:#d4eaf2;
}

</style>
<script type='text/javascript'>
var defaultnoimage=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXTZkXRiXuTC7M_dLK8BrzZyS8okVuPLpZSdghQKarYlR_W5sWnlyGjBlu0DljkKr3aqOcR2rESZJmu6cn7FtMZbsiEZ5V7tyYQeYCtG3TGnag6UTMAbbb2bmJzEh5xOf83p_ff3jR7Gc/s400/noimage.png&quot;;
var maxresults=5;
var splittercolor=&quot;#d4eaf2&quot;;
var relatedpoststitle=&quot;Entri Terkait &quot;;
</script>
<script src='http://blogergadgets.googlecode.com/files/related-posts-with-thumbnails-for-blogger-pro.js' type='text/javascript'/>
<!-- remove --></b:if>
<!--Related Posts with thumbnails Scripts and Styles End-->


Setelah meletakkan kode di atas, silakan letakkan kode di bawah ini di bagian kode <div class='post-footer-line-1'> atau 2 dan 3 :

    <!-- Related Posts with Thumbnails Code Start-->
    <!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
    <div id='related-posts'>
    <b:loop values='data:post.labels' var='label'>
    <b:if cond='data:label.isLast != &quot;true&quot;'>
    </b:if>
    <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=6&quot;' type='text/javascript'/></b:loop>
    <script type='text/javascript'>
    removeRelatedDuplicates_thumbs();
    printRelatedLabels_thumbs(&quot;<data:post.url/>&quot;);
    </script>
    </div><div style='clear:both'/>
    <!-- remove --></b:if>
    <b:if cond='data:blog.url == data:blog.homepageUrl'><b:if cond='data:post.isFirstPost'>
    <a href='http://www.bloggerplugins.org/2009/08/related-posts-thumbnails-blogger-widget.html'><img alt='Related Posts Widget For Blogger with Thumbnails' src='http://image.bloggerplugins.org/blogger-widgets.png' style='border: 0'/></a><a href='http://bloggertemplates.bloggerplugins.org/'><img alt='Blogger Templates' src='http://image.bloggerplugins.org/blogger-templates.png' style='border: 0'/></a>
    </b:if></b:if>
    <!-- Related Posts with Thumbnails Code End-->

Tidak ada komentar:

Posting Komentar