I am looking for a script or plugin that disable loading thumb in mobile browser but load thumb on desktop browser.

Clearly, in a wordpress website, if I visit a website in desktop browser then website homepage post will load thumb and if I visit this site in mobile browser then website homepage post will not load thumb.

How can I stop loading thumb in mobile? Thanks in advanced. Sorry for bad English.


1 Answer 1

  /* if its not mobile */
  if ( !wp_is_mobile() ) {
  /* load and show the post thumbnail */

You can read on wp_is_mobile here and on the the_post_thumbnail here

  • wp_is_mobie is a bad thing to use as you should not detect device type on server side, just on client side. It might specifically break caching depending on how the caching is done. Commented Dec 27, 2015 at 10:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.