How to Hide Blogger Post Content from Homepage

Posted by Lasantha Bandara on May 21st, 2015 File Under : change template, post0 Comment

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 == &quot;&quot;'>
  <!-- Then use the post body as the schema.org description,
	  for good G+/FB snippeting. -->
  <div class='post-body entry-content' expr:id='&quot;post-body-&quot; + 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='&quot;post-body-&quot; + 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 == &quot;&quot;'>
  <!-- Then use the post body as the schema.org description,
	  for good G+/FB snippeting. -->
  <div class='post-body entry-content' expr:id='&quot;post-body-&quot; + 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='&quot;post-body-&quot; + 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.

File Under : change template, post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.