Mastering Selective Display Of Blogger Widgets On Blogger Homepage.

Here is too a genuinely rattling petty tutorial on the cheers to demo your blog's widgets selectively on your pages.


Let's suppose you lot only would similar to indicate your Profile device on your blog's Homepage, but non on the option pages. this could live on but it's done.

Step 1: re-create your model

Go to your blog's Layout Page, together with locomote inward HTML-edit mode. transfer your illustration equally Associate inward Nursing XML-file together with shop it throughout a secure place. simply precisely inward instance template-hacking takes a incorrect flip somewhere, you lot volition transfer your template-file nonetheless 1 time to a greater extent than together with you lot are dorsum to ancient.

Step 2: Locate the Profile Widget

Enlarge the widget-code past times checking the checkbox on the HTML-edit page. Now scroll downwards together with expect for the Profile Widget, that looks similar this:

<b:widget id='Profile1' locked='false' title='About Me' type='Profile'>
<b:includable id='main'>
<b:if cond='data:title != &quot;&quot;'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
...
...
</div>
</b:includable>
</b:widget>


Step 3: Modify the widget code

Now nosotros exclusively desire to display this widget if the page that nosotros are looking at is our blog's Homepage. We volition locomote a <b:if>-statement to cheque for this situation.
Insert the next (red) lines of code into the widget code:

<b:widget id='Profile1' locked='false' title='About Me' type='Profile'>
<b:includable id='main'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<b:if cond='data:title != &quot;&quot;'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
...
...
</div>
</b:if>
</b:includable>
</b:widget>


The information plain data:blog.homepage URL contains the URL of your blog's homepage. The information plain data:blog.url holds the URL of this page. If expanse unit of measurement they're  an equivalent (=) nosotros tend to are on the homepage together with hence the contraption ought to live on displayed. If they're non an equivalent, the widget code is skipped.

Step 4: Now save,that’s all.

Comments

Popular posts from this blog

Gove confirms mandatory housebuilding targets for councils will be abolished in face of Tory rebellion – UK politics live

Kotak Mahindra Bank Recruitment 2022 Released for Graduate Candidates And Apply Online