How to hide or display widgets on a mobile device

How to hide or display widgets on a mobile device
As we know in accordance with the times, mobile devices have become a basic need of everyone as a communication tool that provides many benefits for all of us.

Still related to this, after the Google Mobile Friendly Algorithm was updated on April 21, 2015. Many webmasters make sites that are Mobile Friendly and responsive so they can be accessed more quickly and conveniently through mobile devices. Of course this is a positive step and as the initial foundation in building a website, for the next step, just how we manage the site.

Okay, blogger tips this time I will give tips on how to hide or display a widget on a blog on a mobile device. This trick can indeed be done by adding CSS CSS display: none on certain widgets that you want to hide on a mobile device with a certain resolution, but there is a better and more practical way that I will give below.

This trick only applies to smartphone devices and will not affect tablet, iPad, and others.
Hide Widgets in Mobile Devices

First, please open the template editor on your blog. Then specify what widgets will be hidden from the mobile device, for example here I will hide the HTML1 widget in the template by writing conditional tags like this
<b:if cond='data:blog.isMobileRequest == "false"'>
<b:widget id='HTML1' locked='false' title='' type='HTML' version='1' visible='true'>
-----
</b:widget>
</b:if>

Display Widgets on Mobile Devices

And if you want to display widgets only on mobile devices, you can change the false value in the above code to true

<b:if cond='data:blog.isMobileRequest == "true"'>
<b:widget id='HTML1' locked='false' title='' type='HTML' version='1' visible='true'>
-----
</b:widget>
</b:if>

Next save the template and see the results.

Well, how? It's easy enough. So many of me about How to Hide or Display Widgets on Mobile Devices. Hopefully useful for all friends, thank you.

Related Post

Comments

Silahkan Memberikan Komentar Jika Ada Hal Yang Kurang Dipahami Dengan Topik Yang Telah Sobat Baca. Biasakan Berkomentar Dengan:

♥ Sopan dan Bahasa Yang Mudah Dipahami.
♥ Tidak Memasukkan Link Aktif Dalam Form Komentar.
♥ Berkomentar Sesuai Artikel Atau Postingan.
♥ Berilah Informasi, Jika Script Atau Link Yang Tidak Berfungsi Dan Mati.
♥ komentar Jorok / Kasar / SARA / PORNO Anggap Sebagai SPAM.
EmoticonEmoticon