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

Feeds for you

Who Is Lookup

Again as a part of Custom Domain Troubleshooting, we do Who Is lookup which gives us a handful of information.


What is Who Is Lookup?

Who Is lookup gives exactly what the name means. "Who Is". In addition to Who Is, this will give few useful information like,
Registrar InformationRegistered date and expiry information and so on.

How to do Who Is Lookup?

How to connect any other profile in "About me" widget?

In this article I am going to tell "How to connect any other profile in "About me" widget along with blogger or Google+?"