The Read More link tutorial that I previously shared summarizes all posts to a specified length but then it even appears on Blogger’s newly introduced Static Pages where it should not be. I was scratching my head on how to solve this problem when Sam of Plenty Of E-books came to my rescue. He provided me with a code that shortens posts and also doesn’t let the read more link or button to appear on static pages. So lets replace our old code with this more updated one.
Note:- If you have never implemented this trick before then kindly read this tutorial first –> Add Read More Link To Your Posts
How To Summarize Posts and Hide Read More Link in Static Pages?
- Go To Blogger > Design > Edit HTML
- Backup your template
- Search for the old read more code which looks like this,
<b:if cond='data:blog.pageType != "item"'>
<a expr:href='data:post.url'><div style="text-align: right;">Read More ->></div></a>
</b:if>
or something similar to this. Simply replace it with this one,
<!--READ-MORE-STARTS-->
<b:if cond='data:blog.pageType == "static_page"'><br/>
<b:else/>
<b:if cond='data:blog.pageType == "index"'><br/>
<a expr:href='data:post.url'><div style='text-align: right;'>
<img height='33px' src='IMAGE URL OF READ MORE BUTTON' width='120px'/></div>
</a>
</b:if>
</b:if>
<!--READ-MORE-STOPS-->
kindly replace IMAGE URL OF READ MORE BUTTON with Image link of your read more button. If you don’t have a button then grab one from some of the buttons I designed in past,
Visit these links,
Save your template and view your static Page to see it working just perfect! Peace :)
No comments:
Post a Comment