How To Add Together Related Postal Service Without Thumbnail To A Blog.
Adding related post at the destination of every blogger post is an essential agency of improving every spider web log site performance, improving site traffic together with too engaging readers.
Obviously roughly persons come upwards to view your site, piece roughly are actually looking for information, related post plays the telephone commutation purpose here, past times facilitating together with suggesting to a reader what adjacent that mightiness endure helpful to hold off out for within your blog.
So hither am going to present yous how to add together related post without thumbnail together with thus inwards my adjacent post I volition present how to add together related post amongst thumbnail.
To add together related post to your site re-create the code below
<!--Related Posts Scripts together with Styles Start-->
<style>
#related-posts {
float : left;
width : 350px;
margin-top:20px;
margin-left : 5px;
margin-bottom:20px;
font : 11px Verdana;
margin-bottom:10px;
}
#related-posts .widget {
list-style-type : none;
margin : 5px 0 5px 0;
padding : 0;
}
#related-posts .widget h2, #related-posts h2 {
font-size : 20px;
font-weight : normal;
margin : 5px 7px 0;
padding : 0 0 5px;
}
#related-posts a {
text-decoration : none;
}
#related-posts a:hover {
text-decoration : none;
}
#related-posts ul {
edge : medium none;
margin : 10px;
padding : 0;
}
#related-posts ul li {
display : block;
background : url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT0qYpqk_deA_yqQZuE3-DMH3bg2Q0EYBFeRed89StsD-jbjjcbWeKWaceSA_MyhK1XMPtOqwDyiwZY7TPhPW5Siw5LY2hvAktNlne-TBYF23EeXL2Jp4TptoZiOykWr0w8SKXxbpOe9s/s200/greentickbullet.png) no-repeat 0 0;
margin : 0;
padding-top : 0;
padding-right : 0;
padding-bottom : 1px;
padding-left : 21px;
margin-bottom : 5px;
line-height : 2em;
border-bottom:1px dotted #cccccc;
}
</style>
<script type='text/javascript'>
//<![CDATA[
var relatedTitles = novel Array();
var relatedTitlesNum = 0;
var relatedUrls = novel Array();
business office related_results_labels(json) {
for (var i = 0; i < json.feed.entry.length; i++) {
var entry = json.feed.entry[i];
relatedTitles[relatedTitlesNum] = entry.title.$t;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
relatedUrls[relatedTitlesNum] = entry.link[k].href;
relatedTitlesNum++;
break;
}
}
}
}
business office removeRelatedDuplicates() {
var tmp = novel Array(0);
var tmp2 = novel Array(0);
for(var i = 0; i < relatedUrls.length; i++) {
if(!contains(tmp, relatedUrls[i])) {
tmp.length += 1;
tmp[tmp.length - 1] = relatedUrls[i];
tmp2.length += 1;
tmp2[tmp2.length - 1] = relatedTitles[i];
}
}
relatedTitles = tmp2;
relatedUrls = tmp;
}
business office contains(a, e) {
for(var j = 0; j < a.length; j++) if (a[j]==e) provide true;
provide false;
}
business office printRelatedLabels() {
var r = Math.floor((relatedTitles.length - 1) * Math.random());
var i = 0;
document.write('<ul>');
piece (i < relatedTitles.length && i < 20) {
document.write('<li><a href="' + relatedUrls[r] + '">' + relatedTitles[r] + '</a></li>');
if (r < relatedTitles.length - 1) {
r++;
} else {
r = 0;
}
i++;
}
document.write('</ul>');
}
//]]>
</script>
<!--Related Posts Scripts together with Styles End--></head>
Login into your blogger dash board click on Theme.
Click on Edith Html
Search for </head> by pressing command F together with thus click within the html afterward typing it, hitting the instruct inwards key.
Place the code higher upwards the </head>.
Save the Html.
Now to brand the related post present on your spider web log re-create the code below.
Search for </b:if>
Past the code inwards forepart of it.
<!--Related Posts amongst thumbnail Starts-->
<b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<font face='Arial' size='3'><b>Related Posts:
</b></font><font color='#FFFFFF'><b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='data:label.isLast != "true"'>,</b:if><b:if cond='data:blog.pageType == "item"'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels&max-results=5"' type='text/javascript'/></b:if></b:loop>
</font>
<script type='text/javascript'> removeRelatedDuplicates(); printRelatedLabels();
</script>
</div>
</b:if>
<!--Related Posts amongst thumbnail Ends-->
You tin too alter the variables past times changing their numbers.
I promise this post is useful together with I volition similar to demand heed from yous on the comment box below.
Thanks for staying amongst us at techsfair.com.
0 Response to "How To Add Together Related Postal Service Without Thumbnail To A Blog."
Post a Comment