Apr 20, 2014

How to Edit Auto Read More Widget of Blog | Blogspot

This edit is for "auto read more" snippet. It is very effective to disallow auto read more snippet (of displaying only 200 words of the post content) in the post list of search label. This allow the post to appear in full when a search label is clicked .

If there are four posts of a search label tag , then all the posts open in full after the tag is clicked.

However the snippet will appear on homepage and archive pages . To disallow snippet at archive pages, one set extra code is to be inserted, just like the yellow highlighted code. And extra snippet can be placed below code.

The full code is given below.

<!-- AutoreadmoreWIDGET Start -->
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.searchLabel'>
<data:post.body/>
<b:else/>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'> createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);
</script>
<span class='more' style='float:right;padding-top:2px;'><a expr:href='data:post.url'> Read More </a></span>
</b:if>
</b:if>
</b:if>
<!-- AutoreadmoreWIDGET end -->
This yellow highlighted code is inserted in the above set of code to disallow auto read more snippet in the search label posts list.
<b:if cond='data:blog.searchLabel'> yellow color.
<data:post.body/>
<b:else/>

The condition can also be applied with any particular page by inserting the <b:if conditional code . Now it depends on the creativity of the user to exploit this code for maximising advantages . 

Here I am showing the conditional code to disallow the snippet on archive pages. To do so we need to insert this code after the above code:

<b:if cond='data:blog.pageType=="archive"'>
<data:post.body/>

Total code for search label and archive pages will be like this.

<b:if cond='data:blog.searchLabel'> yellow color.
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType=="archive"'>
<data:post.body/>

No comments:

Post a Comment