How to display widgets in mobile view

image created pixabay.com
How to display widgets in mobile view

To set up widgets that you can display in the mobile version, you just need to add the new Attribute to the <b: widget /> tag.


For example, I want to display the popular widget post in the mobile version, then the first way is to go to dashboard> template> edit HTML. then look for html code that shows widget pupuler post, Or you can use CTRL + F then type the name of widget as example widget popular post.

following example html code for popular post <b: widget id = 'PopularPosts3' locked = 'false' title = 'Popular Posts' type = 'Popular Posts'>.

Well what we need to do is add a new Attribute on the widget tag, which is mobile. This mobile attribute itself has three values, namely Yes, No, and Only. Here's an example of how it's implemented:
  •  <b: widget id = 'PopularPosts3' mobile = 'yes' locked = 'false' title = 'Popular Posts' type = 'PopularPosts'>. 
The above code is for displaying the popular widget post mobile version and also appears in desktop version display.
  •  <b: widget id = 'PopularPosts3' mobile = 'no' locked = 'false' title = 'Popular Posts' type = 'PopularPosts'>
While the above code to hide widgets in the mobile view
  •  <b: widget id = 'PopularPosts3' mobile = 'only' locked = 'false' title = 'Popular Posts' type = 'PopularPosts'>
Moderate the code above to display the popular widget post mobile version but not appear on the desktop version.

Thank you !
Advertisement
How to display widgets in mobile view
Previous
This Is The Oldest Page