chan liu
asked 10 years ago

DW Focus provide different view cross all devices: pc, pad, and mobile.
but i found the page loading speed is very slow on mobile.
How can I provide different view over mobile, ex, hide the sidebar and particular widget in mobile site.

chan liu
replied 10 years ago

how to optimize the loading peed on mobile?
i found too many widgets and functions are loaded in each page.

2 Answers
DominicStaff
answered 10 years ago

Hi Chan !
If you want to remove/optimize the loading speed on mobile, You can add the following code to the sections that you want to hide on the Mobile.
– To hide the sidebar on the mobile, You can open the sidebar.php / sidebar-single.php / sidebar-blog.php / sidebar-archive.php file.
Find the line 8, add the following class (visible-desktop)  to the Class section of the Secondary:
E.g:

 <div id="secondary" class="widget-area span3 visible-desktop" role="complementary">

Hope this helps !
 

chan liu
replied 10 years ago

but by this way, actually the page still loads the sidebar and all the widgets. they are just hidden when being browsed on small screen. the page loading is still very slow.

Is it a way to identify user-agent and prevent the sidebar or widgets loading into the page?

thanks very much!!!
i am trying to build a mobile-friendly sites also.

DominicStaff
answered 10 years ago

Hi Chan !
At the moment Our DW Focus does not yet support to identify user-agent and prevent the sidebar or widgets loading into the page.
However, you can find the guide here for how to speed up Your WordPress Sites: http://www.htmlgoodies.com/beyond/cms/10-ways-to-speed-up-your-wordpress-sites.html
Hope this helps !

Powered by DW Question & Answer Pro