Learn to make money online Make money online writing

Saturday, August 8, 2009

Make Related Post / Related Article

Make Related Post Title, what is it? Related Post is the correspondence posting between one and the other, serves to facilitate visitors (readers) blog to be more easily found in the article related to an article that has been read. And of course the visitors will be pleased if you can find the articles they need. Meanwhile Related Post own form of links from the articles associated with the category based on / label. Want to know how to make it? Let's study together.

Follow the steps There :
1. Please log on blogger.com with your gmail account.
2. Select the "Layout" then select "Edit HTML"
3. Check the "Expand Widget Templates"

Tips :
To avoid the things that you do not want (failed edit), please download the template you by clicking "Download Full Template" then save the template on the hard drive or other storage media. If you fail to enter the code in HTML or CSS, please do the template you again.

4. Find the code below :

<data:post.body/>

Tips :
To make it easier to step in your search, please press F3 on your keyboard (FireFox browser) and enter the code available at a coulom. The code will be blocked with the color green. Or copy and paste all the HTML code on your template and insert into the notepad. Please click "Edit", then "Find" and enter the code into the search box.

5. If you have met, please enter the following code and place it under the code no. 4


<b:if cond='data:blog.pageType == "item"'>

<div class='similiar'>



<div class='widget-content'>

<h3>Related Posts by Categories</h3>

<div id='data2007'/><br/><br/>

<script type='text/javascript'>



var homeUrl3 = " <data:blog.homepageUrl/>";

var maxNumberOfPostsPerLabel = 4;

var maxNumberOfLabels = 10;



maxNumberOfPostsPerLabel = 100;

maxNumberOfLabels = 3;





function listEntries10(json) {

var ul = document.createElement('ul');

var maxPosts = (json.feed.entry.length <= maxNumberOfPostsPerLabel) ?

json.feed.entry.length : maxNumberOfPostsPerLabel;

for (var i = 0; i < maxPosts; i++) {

var entry = json.feed.entry[i];

var alturl;



for (var k = 0; k < entry.link.length; k++) {

if (entry.link[k].rel == 'alternate') {

alturl = entry.link[k].href;

break;

}

}

var li = document.createElement('li');

var a = document.createElement('a');

a.href = alturl;



if(a.href!=location.href) {

var txt = document.createTextNode(entry.title.$t);

a.appendChild(txt);

li.appendChild(a);

ul.appendChild(li);

}

}

for (var l = 0; l < json.feed.link.length; l++) {

if (json.feed.link[l].rel == 'alternate') {

var raw = json.feed.link[l].href;

var label = raw.substr(homeUrl3.length+13);

var k;

for (k=0; k<20; k++) label = label.replace("%20", " ");

var txt = document.createTextNode(label);

var h = document.createElement('b');

h.appendChild(txt);

var div1 = document.createElement('div');

div1.appendChild(h);

div1.appendChild(ul);

document.getElementById('data2007').appendChild(div1);

}

}

}

function search10(query, label) {



var script = document.createElement('script');

script.setAttribute('src', query + 'feeds/posts/default/-/'

+ label +

'?alt=json-in-script&callback=listEntries10');

script.setAttribute('type', 'text/javascript');

document.documentElement.firstChild.appendChild(script);

}



var labelArray = new Array();

var numLabel = 0;



<b:loop values='data:posts' var='post'>

<b:loop values='data:post.labels' var='label'>

textLabel = " <data:label.name/>";



var test = 0;

for (var i = 0; i < labelArray.length; i++)

if (labelArray[i] == textLabel) test = 1;

if (test == 0) {

labelArray.push(textLabel);

var maxLabels = (labelArray.length <= maxNumberOfLabels) ?

labelArray.length : maxNumberOfLabels;

if (numLabel < maxLabels) {

search10(homeUrl3, textLabel);

numLabel++;

}

}

</b:loop>

</b:loop>

</script>

</div>



</div>

</b:if>

6. Save your template.

Note :
For blogs that use the "Read More" will usually be found the same code 2, please place the code in the first code.
Almost forgot, if you want to modify any posts "Related Post by categories", please search the code and change the text you want.

Hopefully helpful, happy blogging ..!!


Share/Save/Bookmark

Subscribe


Related Posts by Categories



0 comments:

Post a Comment

Leave your comment about we're articels

Link Exchange

Want to exchange links with the Ordinary Blog's..?? Please copy paste HTML and script code to install your blog ...

Share anything place

Insert Your Banner Here


Just Clicking

PAID TO CLICK AFFILIATE PROGRAM
Is affiliate between advertisers and web master. You just click and see the ads that are displayed on the website then you will get money.
To Join And Get Free Money From The Internet, Please Click On The Banner, 100% Free Sign-Up or Registration
Join Vinefire!

Our Visitor

free counters