Learning SEO

Translate

How to Make a Widget Shown in posts or Homepage



How to make a widget appear only on post or homepage. 


Back again with the tutorial blogspot with Mas Aziz. This time we will discuss how to create a blog widget that appears only in the post or homepage. This method is usually done by bloggers for not too many widgets that appear on the page. So it seems elegant and professional blog.

These tips on how to make the widget appear only on the homepage or posts 


1 Log in to Blogger.com

2 Select Edit HTML in your Blogger Dashboard

3 Backup template so easy to restore if something goes wrong

4 Type CTRL + F on your keyboard to facilitate the search code. Example: linkwithin

Make widget to appear on Homepage 


1 Place the code <b: if cond = 'data: == blog.url Data: blog.homepageUrl'> under <b: includable id = 'main'>

2 Put the code </ b: if> above </ b: includable>

3 Examples of complete code:

<b: widget id = 'HTML10' locked = 'false' title = 'LinkWithin' type = 'HTML'>
<b: includable id = 'main'>
<b: if cond = 'data: == blog.url Data: blog.homepageUrl'>
<! - Only display title if it's non-empty ->
<b: if cond = 'data: title! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if> <div class = 'widget-content'>
<data: content />
</ div> </ b: if>
</ b: includable>
</ b: widget>

Make widget to appear only on post

1 Place the code <b: if cond = 'data: blog.pageType == "item"'> just below <b: includable id = 'main'>

2 Put the code </ b: if> above </ b: includable>

3 Examples of the full code like this:
<b: widget id = 'HTML10' locked = 'false' title = 'Latest Articles' 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! = & quot; & quot;'>
<h2 class = 'title'> <data: title /> </ h2>
</ b: if>
<div class = 'widget-content'>
<data: content />
</ div>
</ b: if>
</ b: includable>
</ b: widget>

Do not forget to always SAVE TEMPLATE and see the results, If there is a problem or coding is not working properly please give me ahu via the comments box below.
0 Komentar untuk "How to Make a Widget Shown in posts or Homepage"

Related Posts Plugin for WordPress, Blogger...
Back To Top