Digital Marketing Consultant

Reference Links

Visitor's Flag

Display/Hide Blogger Widget on Specific Pages in Blogger

Tuesday, June 26, 2012

When you add a widget (or a gadget as Blogger would call it) to your blog, by default the widget would appear on all pages –homepage, index, archive, post and static pages. But what if you want a certain widget to appear only on a certain page or pages, can it be done? In other words can you select on which page/pages the widget would or would not appear? The answer is yes you can -by using Blogger conditional tags. Note: This trick doesn't work with Labels, Archive and Followers gadgets. For these gadgets you want to use the CSS's display none method.

Let us proceed,

1. Find your widget or section Id

To address a widget or a section in HTML, you need to know its Id. Here’s how to find a widget or section Id. In url of the widget, you will get widget id like HTML4

2. Locate the widget code in HTML

Go to Dashboard > Design > Edit HTML.

Check the Expand Widget Templates check box on top right of the HTML window.

Find your widget in the HTML by using Ctrl+F and entering the widget Id in the search box.


Your widget code might look like this. It may be a little different, but it’s okay. Just pay attention to the highlighted lines. Widget content is contained in between those two lines -in "includable" section.

<b:widget id='WidgetID' locked='false' title='Widget title' type='HTML'>
<b:includable id='main'>
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>

3. Choose the appropriate conditional tag

I listed some conditional tags in another post -
Targeting specific pages with conditional tag. Copy your desired tag from there and apply it here.

4. Apply the tag

Paste the tag (from step 3) immediately after <b:includable id='main'> and the code line 11 to 15 immediately before </b:includable>, as shown below.

<b:widget id='WidgetID' locked='false' title='Widget title' type='HTML'>
<b:includable id='main'>
PUT CONDITIONAL TAG HERE
<b:if cond='data:title != ""'>
<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'>
#WidgetID {display:none;}/*to hide empty widget box*/
</style>
</b:if>
</b:includable>
</b:widget>

Replace WidgetID in line 13 with the widget ID from code line 1.

The code will check whether the condition is true or false:

If the result is true, it executes (and display) the widget’s content.

If the result is false, it skips the content and hide the widget.
You need to hide the widget because in most templates the content-less widget will still appear -as an empty box.

5. Save and view

Click Save Template button and view your blog.

Free Career Predictions

Ads will display only at post page

Sunday, May 6, 2012

/* Ads will display only at post page */

<b:if cond='data:blog.pageType == "item"'>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
google_ad_host = "pub-xxxxxxxxxxxxxx;;
/* 336x280, created */
google_ad_slot = "xxxxxxx";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</b:if>
=========================
/* conditional code */
<b:if cond='data:blog.url == data:blog.homepageUrl'>
conditional code
</b:if>
======================
/* widget will only display at home page */
<b:widget id='WidgetID' locked='false' title='Widget title' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'> //insert condition here
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if> //End condition here
</b:includable>
</b:widget>

Free Career Predictions

Tricks to Approve Adsense Code

Monday, April 30, 2012

Before starting about 'trick to adsense approval' you must know...

It is however very difficult for a non-US blogger or webmaster to get approved into Google Adsense as its approval policies are generally very complicated and they demand a lot of requirements which would be difficult for newbies to fulfill. For example, your website/blog content must be completely new and created on your own, and not copied; your domain must be registered under your ownership for at least 6 months; your primary domain URL should not be a subdomain or contain extensions such as www.yourdomain.com/example and so forth. Not knowing these circumstances newbies submit their Adsense application which would get rejected 90% of the time.

That’s too hard and long for beginners to get approval from google adsense and maybe fifty-fifty to success. I have the best and quickly solution for thats problem with third-party sites like indyarocks and docstoc from my experience. In this how to trick adsense tutorial only explain how to get approval 100% from google adsense with indyarocks. Indyarocks is a social networking similarly as facebook.

Now you can easily get approved into Adsense by making use of Indyarocks – an Indian social networking site officially partnered with Adsense and which shares 100% of your Adsense revenue. Google ads will be displayed on your Indyorocks profile and blog. All you need to do is register (for free), fulfill their minimum criteria in order to apply for Adsense and submit your application. If their criteria are well met your application will be approved and you will get their welcome email within maximum 48 hours (or 2-3 days in some cases).

Just Follow These Simple Steps:
  • Register at Indyarocks here: Register with Indyarocks.
  • Create your profile also make your profile look attractive.
  • 50% of your profile must be completed (but 60% above recommended)
  • Upload your profile image ( it is Strongly recommended upload your own picture)
  • Upload minimum 10 any photos to your album and set visible to everyone.
  • Write 2 or more blogs originally content with english language and don’t forget set visible to everyone and add related tags.

After you fulfilled all the requirements above, goto homepage at indyarocks and right sidebar write “Google Adsense” click and submit your request. You have received a mail from indyarocks with title “Google AdSense Access Verification for indyarocks” for complete verification and after that you should get google adsense mail with approximately 48 hours.

And remember once you get approved you can use the very same google adsense codes on your personal website or blog, and not necessarily use Indyarocks to continue using adsense thereafter. I hope you don’t worry with google adsense and helpful with my best solution in this 'how to trick adsense' post..

Free Career Predictions

Does Google Use Data from Social Sites in Ranking?

Tuesday, November 15, 2011


Hello Matt, a recent article of Danny Sullivan suggests that Google uses Twitter and Facebook links as a ranking signal. Can you confirm this? Can you elaborate a little bit more on this? -WebSEOAnalytics

Free Career Predictions

Difference between Google webmaster and Google analytic tool

Saturday, July 2, 2011

With Google Analytics, we can gather, view, and analyze data about our website traffic (Organic, paid and referral). It generates detailed statistics about visitors to our website. It helps to strengthen your marketing initiatives and create higher converting websites.

Google Webmaster Tools is a free service provided by Google to help new and experienced webmaster check on their indexing and raise the visibility of their website(s). The range of tools offered on Google Webmaster Tools can help webmasters significantly raise their profile by search engine optimization and traffic generation.

Free Career Predictions

Related Posts