This tutorial will help you if you're looking for display only post titles on your site home page. After applying this modification into your Blogger theme, no longer your post content will be displayed on your blog homepage. A Visitor need to click on post title to go post page and view the post content. First backup your blogger theme first before make any change into it. Now go to "Edit HTML" page of your theme.
Find this piece of code:
<b:if cond='data:blog.metaDescription == ""'>
<!-- Then use the post body as the schema.org description,
for good G+/FB snippeting. -->
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='description articleBody'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<b:else/>
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='articleBody'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</b:if>
Replace it below code:
<b:if cond='data:blog.pageType != "index"'>
<b:if cond='data:blog.metaDescription == ""'>
<!-- Then use the post body as the schema.org description,
for good G+/FB snippeting. -->
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='description articleBody'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<b:else/>
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='articleBody'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</b:if>
</b:if>
Preview your theme before save changes. If everything is ok, save your theme and refresh your site to see changes.
0 Comments:
Post a Comment