DEV Community

Cover image for Optimize Wordpress Mobile Website
Chetan Rohilla
Chetan Rohilla

Posted on • Edited on • Originally published at w3courses.org

Optimize Wordpress Mobile Website

Some times our mobile website is very slow in wordpress and we have to optimize our website. Here is some tricks which you can use to optimize your wordpress website. To optimize your website you can disable or remove some elements or modules of your website like sidebar, breadcrumb, footer widgets in your mobile website and to do this use the code given below.

Here we are showing or removing footer widgets in our mobile site.

if (wp_is_mobile() == true) {
    # show our footer widgets if mobile...
}

if (wp_is_mobile() == false) {
    # remove our footer widgets if mobile...
}
Enter fullscreen mode Exit fullscreen mode

And you can use this condition anywhere in your theme. To show or hide elements or section in your website.

There is also some unused CSS for mobile websites and to optimize your website for CSS you can also read remove unused css from your website.

There is also some unused JS for mobile websites and to optimize your website for JS you can also read remove unused js from your website.

You can also remove extra http requests in your website and to remove http requests in wordpress you can read make fewer http requests.


Please like share subscribe and give positive feedback to motivate me to write more for you.

For more tutorials please visit my website.

Thanks:)
Happy Coding:)

Top comments (0)