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'>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:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
<b:if cond='data:blog.url != data:blog.homepageUrl'>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.
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
</b:if>
In addition to the code, you also can use the code as follow:
<b:if cond='data:blog.pageType == "item"'>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.
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/>
</b:section>
</b:if>
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.- Please login to blogger with your ID
- Click Design.
- Click Edit HTML.
- Then you’re suggested to back up your full template by clicking Download Full Template.
- 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>
- Replace the code with the following code:
<b:if cond='data:blog.pageType == "item"'> <b:section class='main' id='main' showaddelement='no'> <b:widget id='Blog1' locked='true' title='Posting Blog' type='Blog'/> </b:section> </b:if>
- Click SAVE TEMPLATE.
- Done
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.
0 comments:
Post a Comment