Lad Who Codes

Remove #More From Blogger Read More Link

Posted by Dinesh Verma on Thursday 14 February 2019

When you are writing an article for your blogger blog, you would want to display only a brief part of the article on home or any archive page. Also, you . would want the user to be able to read the entire article when user opens one. This is where Read More links come into play.

Read more links allow you to show a small part of article on home screen or any archive screen and when user clicks on it, the complete article is displayed. This is a functionality provided by all the major blogging platforms. Blogger provides this functionality too.

If you are reading this article, then I assume that you are using this feature. Now, lets come back to the problem.

The issue we are facing here is - when an user clicks on read more link, the blog post URL is opened with #more appended to it. This makes the page auto scroll to the section of article beyond the point which was displayed on home screen.

Though this feature makes perfect sense, but sometime you would want your users to see the complete page. So, lets begin the digging to fix this auto scroll issue.

Remove #More from blogger read more link

To remove #more from blogger read more link, follow the steps below:

  1. Open Theme and click on Edit Html.
  2. Search for hasJumpLink, and then:
  3. 
    // Replace this line
    <a expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
    
    // With this line
    <a expr:href='data:post.url + &quot;&quot;' expr:title='data:post.title'><data:post.jumpText/></a>
    
    
  4. And save the template.

Now, when you click on Read More link, you wont see the #more appended to the URL. Problemo solved :)

Post a Comment