Skip to main content

Add Adsense or Html Gadget in either Mobile or Desktop Version of Blogger Themes

In this post, I will explain how to easily show any Gadget, only in Mobile or Desktop in all Blogger Themes, including the latest default Notable, Soho, Contempo, Emporio, and Essential Themes.

This simple Conditional Code will enable you to show any Gadget, including the Adsense Gadget or Adsense Code that has been directly added inside the Blogger Body in an Html Gadget either in the Mobile or Desktop versions of the Blogger Blog.

Edit Template and jump to the widget:

For example if you have added the  adsense code in an Html Gadget and want to show it only in mobile devices, then add this conditional tag:

<b:if cond='data:blog.isMobileRequest == &quot;true&quot;'>

/b:if>


See Example of adsense code added in an Html Gadget with the Mobile Only conditional tag:

<b:widget id='HTML1' locked='false' title='' type='HTML' version='2' visible='true'>
<b:widget-settings>
<b:widget-setting name='content'><![CDATA[<script async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" ></script><!—Add Name--><ins class="adsbygoogle" data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" data-ad-format="auto" data-ad-slot="xxxxxxxxxx" data-full-width-responsive="true" style="display: block;"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({});</script>]]></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:blog.isMobileRequest == &quot;true&quot;'>
<b:include name='widget-title'/>
<div class='widget-content'>
<data:content/>
</div></b:if>
</b:includable>

Example of Adsense Default Adsense Gadget with Mobile-only conditional tag:

If you have added the Default Adsense Gadget in the Blogger Theme and want to show it only in the Mobile version, then refer to the example shown in the image given below.

Mobile only conditional tag for Blogger Themes

If you wish to add the Html Gadget along with the adsense code only in the Desktop version of your site, then add this conditional tag:

<b:if cond='data:blog.isMobileRequest != &quot;true&quot;'>

</b:if>


See Example of adsense code added in Html Gadget and shown only in Desktop version:

<b:widget id='HTML3' locked='false' title='' type='HTML' version='2' visible='true'>
<b:widget-settings>
<b:widget-setting name='content'><![CDATA[<script async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" ></script><!-- Below Header-Desktop --><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" data-ad-slot="xxxxxxxxxx" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({});</script>]]></b:widget-setting>
</b:widget-settings>
<b:includable id='main'>
<b:if cond='data:blog.isMobileRequest != &quot;true&quot;'>
<b:include name='widget-title'/>
<div class='widget-content'>
<data:content/>
</div></b:if>
</b:includable>

Example of Adsense Default Adsense Gadget with Desktop only conditional tag:

Blogger conditional tag for Desktop Theme

The same procedure can be used to show any other Gadget either in the Mobile or Desktop versions of your Blogger Blog.

Comments

Popular posts from this blog

3d images of Sai baba of Shirdi

These are some more 3d images created out of photographs of the great Indian saint Sai Baba of Shirdi.

3d photos of Shirdi Sai Baba

These are 3d photos of the great Indian Saint Sai Baba of Shirdi

3d Photo-frames Shree Swami Samarth

Shree Swami Samarth Maharaj of Akkalkot in Sholapur District of Maharashtra is a very popular saint.Numerous miracles are attributed to him.He is considered to be an Avatar of the Hindu God Dattatreya. Related articles Gayatri Aarti English-Hindi (prophet666.com)

Shirdi Sai Baba 3d images

This is a beautiful template of six 3d images of the same photo of Sai Baba of Shirdi

3d Photos of Shirdi Sai Baba 2

These are more 3d photos made from the same photo of the great Indian Saint Sai Baba of Shirdi

DIRECT REALISATION

(1)I bow to that Ṣrî Hari (Vishṇu), the infinite bliss, the Teacher, the Supreme Lord, all-pervading, the prime-cause of all the worlds. Direct realisation is herein expounded as a means to liberation. It should be studied, again and again, with great effort, only by the wise. (2) By following the duties of one's own caste and order, by asceticism and by the propitiation of Hari, men will gain the four-fold requisite of freedom from desires, etc. (3) Spotless freedom from desires means such a dissatisfaction in respect of all objects from Brahman down to the inanimate as is felt in respect of the excrement of a crow. (4) Discrimination of the real means the determination that the nature of the self is eternal while, all that is perceptible is otherwise (5) The constant eradication of mental impressions is called control of mind. The restraint of external activities is called control of body. (6) Extreme abstention is the turning away from the objects of enjoyment. The

7 Most Beneficial Jain Mantras for Everyone

The 7 Jain Mantras that have been described in this article are considered to be the most potent and beneficial Mantras for getting all kinds of benefits, like peace of mind, a gain of intelligence and knowledge, unexpected wealth, and every kind of joy and happiness.

Symbol of the Indian Rupee

Udaya Kumar, a post graduate in Design from Indian Institute of Technology Bombay has designed the symbol of the Indian Rupee. This symbol has come into effect from 15th July, 2010.  The symbol is an amalgam of Devanagari "Ra" and the Roman Capital "R" with two parallel horizontal stripes running at the top representing the national flag and also the "equal to" sign.

Removing Spaces and Entry Footer in Wordpress Twenty Twenty-One Theme

In this post, I have explained how to remove large blank spaces in the latest Default Wordpress Twenty Twenty-One Theme. I have tried this CSS and this is a working tutorial. 

sab ka malik ek - image

Sab ka malik ek or every one's god is one is the popular saying of Sai Baba of Shirdi.This is a image of the saying.