Skip to main content

How to create [Return to top] links on all post?

In this article am gonna tell "How to create [Return to top] links on all post?" Its a simple work with template editing.
  1. Follow First two steps as previous article.
  2. Find the following codes one by one and place the code <a name='posttop'/> before each code given below.
    • <a expr:href='data:post.link'><data:post.title/></a>
    • <a expr:href='data:post.url'><data:post.title/></a>
    • <data:post.title/>
    • <data:post.title/>
  1. You shall see the above codes some where around the code <b:includable id='post' var='post'> and the above part of code looks like as below.
  2. <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a> <b:else/>
    <b:if cond='data:post.url'>
    <b:if cond='data:blog.url != data:post.url'>
    <a expr:href='data:post.url'><data:post.title/></a> <b:else/>
    <data:post.title/> </b:if>
    <b:else/>
    <data:post.title/> </b:if>
    </b:if>
    </h3>
    </b:if>
  1. After doing steps 1 & 2, Your code will look like as shown below.
  2. <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'>
    <b:if cond='data:post.link'>
    <a name='posttop'/><a expr:href='data:post.link'><data:post.title/></a> <b:else/>
    <b:if cond='data:post.url'>
    <b:if cond='data:blog.url != data:post.url'>
    <a name='posttop'/><a expr:href='data:post.url'><data:post.title/></a> <b:else/>
    <a name='posttop'/><data:post.title/> </b:if>
    <b:else/>
    <a name='posttop'/><data:post.title/> </b:if>
    </b:if>
    </h3>
    </b:if>
  1. Now find <b:if cond='data:post.hasJumpLink'> and the code around will look as below,
  2. <b:if cond='data:post.hasJumpLink'>
    <div class='jump-link'>
    <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
    </div>
    </b:if>
  1. Replace the above lines of code in red with the following lines of code in blue.
  2. <b:if cond='data:post.hasJumpLink'>
    <div class='jump-link'>
    <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
    </div>
    <b:else/>
    <a expr:href='data:post.url + &quot;#posttop&quot;'>[Return to top]</a>
    </b:if>
  1. Save template. You are done with it!
  2. It is found that your site is more visible in SEs when links of your own blog is given a number of times inside your site itself. So implementing this is recommended.
  3. To know how I controlled the flow of code above with vertical scroll bars, click here
Update :-
  1. Still an easy method. Go to HTML Template editor.
  2. Find <data:post.body/> or sometimes <p><data:post.body/></p>. However You could find <data:post.body/> using Ctrl + F.
  3. Replace either with the following code,
    <b:if cond='data:post.hasJumpLink'><data:post.body/><b:else/><a name='postbody'/><data:post.body/><a href='#postbody'><font size='5'><div align='right'>&#9650;</div></font></a></b:if>
  4. Save Template.
Happy Blogging!

Comments

Popular posts from this blog

Meet a spammer

Let me start by a warning, This blogpost has nothing to do with howtoblog and is a story of a spammer.

Years ago we had to face a spammer in the forum(Probably during Pistachio?) who was very persistent. He was a link dropping spammer who kept sharing his blog URL under every reply in the forum and somewhere to his blogposts which merely had instructions from Blogger Help Centre.

It went as,
Thanks and Regards,
HIS NAME
HIS BLOG URL Probably it was so difficult for TCs to make him go away as I happened to see him for months, spamming in the forum and one fine day he disappeared and never returned.

I happened to find him and interview him which I am writing down here,

Blogger Language Confusions

In BHF, we recently had a great confusion on Blogger Platform language and Blogger Blog language. So I decided to go ahead and write in detail about it.

There are two important terms here to begin with,
Blogger PlatformBlogger BlogBlogger Platform is what you see when you go to https://www.blogger.com. The operating system that helps you write and manage your blogs on Blogger.