Codes For Displaying Widgets On Specific Pages
MyWebBlog4U - One way to beautify sebuat blog is to display widgets in different places-bada according to functionality and usefulness. With codes that will be discussed here, but will create a blog to be more visible and attractive will also further offset loading.
Without length, here's the codes :
Then enter the code, as follows:
<b:widget id=”HTML1” locked=”false” title=”Posting Terbaru” type=”HTML”>
<b:includable id=”main”>
<b:if cond=’data:blog.pageType == "item"’>
<!– only display title if it’s non-empty –>
<b:if cond=”data:title != “””>
</b:if></b:if></b:includable></b:widget><h2 class=”title”><data:title></data:title></h2>
<div class=”widget-content”>
<data:content>
</data:content>
</div>
<b:include name=”quickedit”>
</b;if>
</b:includable>
</b:widget>
Click Save and see the results..
Hopefully useful ...
Without length, here's the codes :
- Showing Widgets Only in Home Page
<b:if cond=’data:blog.url == data:blog.homepageUrl’>
………………………………………………
</b:if>
- Showing Widget On All Pages Except Home Page
<b:if cond=’data:blog.url != data:blog.homepageUrl’>
………………………………………………
</b:if>
- Showing Widgets Only in Home Archive
<b:if cond=’data:blog.pageType == "archive"’>
………………………………………………
</b:if>
- Showing Widget On All Pages Except Archive Page
<b:if cond=’data:blog.pageType != "archive"’>
………………………………………………
</b:if>
- Showing Widget Only In Page Posts
<b:if cond=’data:blog.pageType == "item"’>
………………………………………………
</b:if>
- Display widgets on All Pages Except Page Posts
<b:if cond=’data:blog.pageType != "item"’>
………………………………………………
</b:if>
- Displaying Widget Only in Specific Postings
<b:if cond=’data:blog.pageType == "URL-Posting"’>
………………………………………………
</b:if>
- Displaying Widgets Except in Specific Postings
<b:if cond=’data:blog.pageType != "URL-Posting"’>
………………………………………………
</b:if>
- Display widgets only on StaticPages
<b:if cond=’data:blog.pageType == "static_page"’>
………………………………………………
</b:if>
- Display widgets on All Pages Except StaticPage
<b:if cond=’data:blog.pageType != "static_page"’>
………………………………………………
</b:if>
- Displaying Widget Only in Specific Label
<b:if cond=’data:blog.url == "alamat-label"’>
………………………………………………
</b:if>
And now, how do I apply it?
First, make sure there are widgets that will be paired in the code above.
Second, go to the Page Template, and then click Edit Template. Then click Format Template. Search Widget name that will be paired with a code on how to push the button on Ctrl + F. Suppose the name of the widget is the latest posts, then click Enter.
It will be found HTML codes, something like the following:
<b:widget id=”HTML1”; locked=”false” title=”Latest Posts” type=”HTML”>
<b:includable id=”main”>
<!– only display title if it’s non-empty –>
<b:if cond=”data:title != “”">
</b:if></b:if></b:includable></b:widget><h2 class=”title”><data:title></data:title></h2>
<div class=”widget-content”>
<data:content>
</data:content>
</div>
<b:include name=”quickedit”>
</b:includable>
</b:widget>
<b:includable id=”main”>
<!– only display title if it’s non-empty –>
<b:if cond=”data:title != “”">
</b:if></b:if></b:includable></b:widget><h2 class=”title”><data:title></data:title></h2>
<div class=”widget-content”>
<data:content>
</data:content>
</div>
<b:include name=”quickedit”>
</b:includable>
</b:widget>
Then enter the code, as follows:
<b:widget id=”HTML1” locked=”false” title=”Posting Terbaru” type=”HTML”>
<b:includable id=”main”>
<b:if cond=’data:blog.pageType == "item"’>
<!– only display title if it’s non-empty –>
<b:if cond=”data:title != “””>
</b:if></b:if></b:includable></b:widget><h2 class=”title”><data:title></data:title></h2>
<div class=”widget-content”>
<data:content>
</data:content>
</div>
<b:include name=”quickedit”>
</b;if>
</b:includable>
</b:widget>
Click Save and see the results..
Hopefully useful ...
Related Post:Tutorial Blogspot |