Removing Post Widget in Homepage

Allright everyone Here we go....


The techniques you can use are “If Condition” code at CSS code or “If Condition” code at HTML code. As an example here, Kang Rohman will take the second technique where this “If Condition” code applied directly to the HTML code areas.
The code of Post Widget in blogger templates is usually as below:
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
If you want the Post Widget or Post Page does not appear in the homepage, you only need to add the code as below (in Red).
<b:if cond='data:blog.url != data:blog.homepageUrl'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
</b:if>
The Red-printed code is the code to make the Post Widget not only disappear in the homepage, but it will also appear in the single post, category, search, archive, etc. The bottom line, the code is to remove the Post Widget from the Homepage only.
In addition to the code, you also can use the code as follow:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
</b:if>
This one is a bit extreme. The Post Widget or Post Pages will only appear on the single pages (the pages where you will see the full posts, i.e. when you open an URL of a post). So, at other pages such as category, archive, search, and other pages will not appear.
So, which one will you choose? Just match with your needs and tastes.

The Trick to remove the Post Widget in the Homepage

The following is the complete tutorial on how to implement or place the above codes in your blogger templates.
  1. Please login to blogger with your ID
  2. Click Design. design
  3. Click Edit HTML. edit-html
  4. Then you’re suggested to back up your full template by clicking Download Full Template. download full template
  5. Find the code as below in your template:
    <b:section class='main' id='main' showaddelement='no'> 
    <b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
    </b:section>
  6. Replace the code with the following code:
    <b:if cond='data:blog.pageType == &quot;item&quot;'>
    <b:section class='main' id='main' showaddelement='no'> 
    <b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
    </b:section>
    </b:if>
  7. Click SAVE TEMPLATE.
  8. Done
One thing to remember that in the homepage or front page, you have to place the links to the posts, those can be the Navigation Menus, Sidebar Links, or whatever wherever you want as long as the visitors can find them.
This trick seems to be much more suitable with the static blogs such as online stores, where such blogs are rarely updated. While for blogs with regular post updates are not too good.



comment 0 comments:

Post a Comment

Delete this element to display blogger navbar

 
© 2010 Harajuku Collection is proudly powered by Blogger