Sunday, May 15, 2011

Give Back a Bit: Fixing the "Read More" problem in Blogger posts

I just found a problem in Blogger with the Read More jump feature, then I fixed it thanks to some helpful souls out there on the internets. You can see the thing I'm talking about if you view this post on the home page of the blog. The first part of the post appears on the home page of the blog but the rest of the post is not visible until you click the link that says "Click here to read the rest of the story..."

This was just not working on this blog before I fixed it today. The link, referred to as a jump and often denoted by More or Read more, did not appear, so there was no easy way to get from the home page to the rest of the story (you couldn't even see that the rest of the story existed).

Apparently this problem exists with some Blogger templates and not others. Using Google I found a solution and it is listed below the jump on this story. I wanted to thank the person who wrote the fix but his blog seems to have disappeared, so I am repeating the fix and thanking "swathipradeep," whom I assume is Swathi Pradeep, for coming up with this code and sharing it.

If you are having this problem with your Blogger blog then here is how you fix it (instructions created by Swathi Pradeep):

1. Back up your template code by downloading it: Go to the Design tab and select Edit HTML, then click Download Full Template. Save to your hard drive. This allows you to get back to the original template if something goes wrong.

2. After backing up your template, click the Expand Widget Templates check box (or tick the tick box if you're a Brit). Now scan your HTML for the following snippet (I used the Ctrl-F shortcut for Find):
<data:post.body/> 
Once you've located that code, paste the following snippet directly below it:
<b:if cond='data:post.hasJumpLink'> 
<div class='jump-link'> 
<a expr:href='data:post.url + "#more"'><data:post.jumpText/></a> 
</div> 
</b:if >
As I have said before and will probably be saying again: I feel like I don't give back enough when it comes to the zillions of tech tips like these that I need/find/use to do my work/play. So I'm going to try to do better. I came up with GeeBaB as an acronym for Give Back a Bit and I will endeavor to geebab more useful tech learnings in the future.

Ironically, I ran into a problem trying to present the above tip because of Blogger's rather primitive display of code text. How did I get around the problem? I read about a dozen web pages offering solutions and decided the best one was these boxes to display code, as described in this post at BlogKori, Thanks!

No comments:

Post a Comment

Thanks for commenting! Why not check out my main blog?