Sabtu, 21 September 2013

Fix Wrong Read More Feature


Blogging is my one of my daily menus.
Everyday, besides doing my daily routine serving my customers (like answering, replying emails, making rate calculation, arranging tour program, booking hotel or accommodation and other travel things), I always spare my time for blogging.
Blogging for me isn't always be associated with posting articles or updating, but modifying templates, learning css, html are also blogging.
I may be a blogaholic and a blogger templateaholic too :)))))
Everyday I always try to find new thing, and that's fun. That might be one of reasons I'm getting in love with blogging things.

As I'm not a geek or have something like education background on template stuffs, all I do is just try and fail. Hope not always try and fail, but try, try, try, succeed and develop and so on ...

Below is one of my findings during my learning by doing when trying to customize and modify a blogspot template.

Read More feature works both on blog post and static page.

How to fix :
  • Using CTRL+F find the the Read More text or something like Read the rest of entry, etc.
  • Find these codes and delete them :
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<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='rmlink' style='float:left'><a expr:href='data:post.url'>Read more ... - <data:post.title/></a></span>
</b:if>
  • Next, replace the deleted codes with the following codes : 
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<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>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/></b:if>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'><data:post.body/></b:if>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div style='float:left;margin-right:10px;margin-top:5px;'>
<a expr:href='data:post.url'>Read more ... - <data:post.title/></a>
</div>
</b:if>
</b:if>
Save template and see how the auto read more feature work as you wanted : Only work for blog post page NOT for static page.

Have a nice day!

0 komentar:

Posting Komentar