Header Ads

Breaking News
recent

News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page

News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page - hello guys Best Web Hosting And Website Builder, On sharing web hosting this time titled News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page, I have been providing the Best Web Hosting And complete Website Builder. Hopefully the contents of posts Best Web Hosting And Website Builder that I write this you can understand. This, he'll Best Web Hosting And Website Builder.

Title : News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page
other title : News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page

Other Title


News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page

This article is nearly how to ready a gadget / widget inwards Blogger thence that it is exclusively visible on the firstly identify that a reader sees when they see your weblog (often called the "home page").  It is 1 of a serial of articles nearly controlling what goes on the homepage of your blogspot blog.


Front Page Bob
By Paginator (Own work)
 [CC-BY-3.0], via Wikimedia Commons
There are a set out of reasons why you lot powerfulness desire to set a gadget exclusively the covert that shows when a visitor firstly navigates to your blog's domicile page.

You may desire to exhibit a welcome message, or a topic-index page, or to plow over a stance of your recent tweets or another RSS feed.    

No affair what the reason, the procedure is rattling similar:

How to brand a gadget exclusively appear on the firstly page

Note:  in Blogger, the words "gadget", "widget", together with fifty-fifty "page-element" all hateful the same thing.  I to a greater extent than oftentimes than non role "gadget", because the Page Elements tab currently says "Add a Gadget".  But they're absolutely the same.

1   Add the gadget

Do this inwards the usual way.


two  Place the gadget

Drag-and-drop the gadget to the identify where you lot desire it.   It may last over or nether your blog-posts gadget, or inwards a totally dissimilar place.

Influenza A virus subtype H5N1 pop identify for a gadget that is going to appear similar a "home page" would last inwards the Body section, simply higher upward the Blog Posts gadget, where "Test Gadget" is inwards this example:



3   Find the Gadget-ID  in the usual way.


4  Find the code for your gadget:

Edit your template.

Click inwards the search box within the template editor, together with appear for the widget advert that you lot noted inwards measuring 3.   Once you've establish it, notice what comes after it.   In this example, it's the business for Blog1:
          <b:section class='main' id='main' showaddelement='no'>
<b:widget id='Text1' locked='false' title='Test gadget' type='Text'/>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>

Use the expansion triangle at the left side of the template editor to expand this department of the code.  After you lot do, it volition appear like:
 <b:section class='main' id='main' showaddelement='no'>
<b:widget id='Text1' locked='false' title='Test gadget' type='Text'>
<b:includable id='main'>
  <!-- exclusively display championship 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:include name='quickedit'/>
</b:includable>
</b:widget>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>

5   Add conditional formatting

You postulate to set conditional formatting code some the code for the gadget - makings certain that it doesn't larn some the code for anything else!  (which is why you lot noted what comes afterward inwards measuring 4)

And to avoid leaving blank infinite where the gadget would bring gone, you lot postulate to update a "hide" pedagogy to apply it to the gadget-id you lot noted inwards measuring 3.

The code to role is this - except set the gadget-id instead of the XXX.

<b:if cond='data:blog.canonicalUrl == data:blog.homepageUrl'>

THE red CODE FOR YOUR GADGET GOES IN HERE 
<b:else/>

<style type='text/css'>
#XXXX {display:none;}/*remove blank infinite that the gadget leaves*/
</style>
</b:if>

The event higher upward looks similar this, when the code has been added:
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Text1' locked='false' title='Test gadget' type='Text'>
<b:includable id='main'>
  <b:if cond='data:blog.canonicalUrl == data:blog.homepageUrl'>  <!-- exclusively display championship 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:include name='quickedit'/>

<b:else/>

<style type='text/css'>
#Text1 {display:none;}/*remove blank infinite that the gadget leaves*/
</style>

</b:if>
</b:includable>
</b:widget>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>


6  Check that it's worked

Preview your weblog earlier you lot salve the changes:  banking concern agree that the the widget is visible.

Save the template changes, together with appear at your blog.  Check that
  • The widget is on the firstly page
  • The widget is non seen when you lot appear at an older page (eg 1 from your archive)
  • The other elements of your weblog (other widgets, weblog postal service titles, dates together with contents) are all every bit you lot await them - on the firstly screen, together with on other screens too.

If anything is incorrect amongst how your weblog is working, larn dorsum to the template editor (Layout > Edit HTML), together with upload from the re-create of your template that you lot made at the firstly of measuring 1.   This volition permit you lot weblog move properly, acre you lot figure out what went wrong.


How to display a gadget exclusively on a specific postal service or page


Follow just the same approach every bit above.

But instead of  
<b:if cond='data:blog.canonicalUrl == data:blog.homepageUrl'>

Make the conditional arguing based on something else.

This tin last a dissimilar condition, or a specific page URL.    For event to display a gadget exclusively on a specific page, role this code, together with set the address of the page instead of POST-URL:
<b:if cond='data:blog.canonicalUrl == "POST-URL"'>>

Note:   for the address of the page, if your weblog does non bring a custom domain, together with thence last careful to role the "blogspot.com" version of the address, non 1 amongst a country-level advert  (eg the blogspot.in or blogspot.co.uk version)


To display a gadget on every page except a specifc one, supervene upon the double equals signs (==) amongst the HTML code for not, which is an exclamation grade followed past times an equal sign (!=).   For example:
<b:if cond='data:blog.canonicalUrl != data:blog.homepageUrl'>

Blogger bring right away provided an expanded listing of conditional statements - you lot tin detect information nearly it:





Where to larn to a greater extent than information

Controlling what goes on the homepage

Adding a gadget / widget / page-element to your blog

Editing your blogger template

Putting a slideshow from Picasa onto your blog

Getting the HTML code to set a film into your blog

Making a gadget that looks similar a posthttps://best-web-hosting-2016.blogspot.com/search?q=setting-what-goes-on-home-page


Thus article News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page

Best Web Hosting And Website Builder News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page, Hopefully can give benefits to all of you. well, the Best Web Hosting And Website Builder posts this time.

You are currently reading the article News!! Displaying A Gadget Solely On The Habitation Page - Or Solely On A Specific Page This article and the url is permalinknya https://best-web-hosting-2016.blogspot.com/2018/01/news-displaying-gadget-solely-on.html Hopefully the article This could be useful.

No comments:

Powered by Blogger.