Although our blog kawaii cute, definitely want if SEO optimized blog. One was by installing related articles below blog post. To stay cute and not boring, we modify the list style with a cute image.
how to make a related articles SEO with cute icon.
<style>
#related-posts{float:left;width:540px;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{border:medium none;margin:10px;padding:0}#related-posts ul li{display:block;background:url("http://i596.photobucket.com/albums/tt44/ainurnajwastory/5e9d0be6.gif") 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 #ccc}
</style>
<script type='text/javascript'>
var relatedTitles=new Array();var relatedTitlesNum=0;var relatedUrls=new Array();function related_results_labels(c){for(var b=0;b<c.feed.entry.length;b++){var d=c.feed.entry[b];relatedTitles[relatedTitlesNum]=d.title.$t;for(var a=0;a<d.link.length;a++){if(d.link[a].rel=="alternate"){relatedUrls[relatedTitlesNum]=d.link[a].href;relatedTitlesNum++;break}}}}function removeRelatedDuplicates(){var b=new Array(0);var c=new Array(0);for(var a=0;a<relatedUrls.length;a++){if(!contains(b,relatedUrls[a])){b.length+=1;b[b.length-1]=relatedUrls[a];c.length+=1;c[c.length-1]=relatedTitles[a]}}relatedTitles=c;relatedUrls=b}function contains(b,d){for(var c=0;c<b.length;c++){if(b[c]==d){return true}}return false}function printRelatedLabels(){var b=Math.floor((relatedTitles.length-1)*Math.random());var a=0;document.write("<ul>");while(a<relatedTitles.length&&a<20){document.write('<li><a href="'+relatedUrls[b]+'">'+relatedTitles[b]+"</a></li>");if(b<relatedTitles.length-1){b++}else{b=0}a++}document.write("</ul>");document.write('<span style="font-size: xx-small;"><a href="http://ashprincesskawaii.blogspot.com" rel="dofollow" title="ash princess kawaii">ash princess kawaii</a>[?]</span>')};
</script>
The next place the script code below second <data:post.body/>
<b:if cond='data:blog.pageType == "item"'><data:post.body/>
<div id='related-posts'><font face='Arial' size='3'><b>Related Posts <data:blog.pageName/>: </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=8"' type='text/javascript'/></b:if></b:loop> </font>
<script type='text/javascript'>removeRelatedDuplicates();printRelatedLabels();</script>
</div>
</b:if>
Place the following script below ]]></b:skin>
The last step save the template! Url images can be changed as desired. Enjoy!
0 Comments:
Posting Komentar