• Resolved crystaljdesign

    (@crystaljdesign)


    In my theme, I am using wp_is_mobile to serve different images to desktop and mobile. Before activating the default “tablets” and “phones” User Agent Groups in W3, I would get desktop and mobile images served seemingly randomly.

    After activating the groups with pass-through, it now appears that mobile images are never served.

    What settings do I need to change in W3 to ensure that wp_is_mobile works properly?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @crystaljdesign

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Are you redirecting users to serve the different images?
    can you please share the Website URL?
    Thanks!

    Thread Starter crystaljdesign

    (@crystaljdesign)

    Thank you so much for the quick reply. I am defining an array of images based on mobile detection in the front-page file in my theme:

    if(wp_is_mobile()){
    $images = array(
    ‘mobile image url 1’,
    ‘mobile image url 2’,
    ‘mobile image url 3’,
    );
    }else {
    $images = array(
    ‘desktop image url 1’,
    ‘desktop image url 2’,
    ‘desktop image url 3’,
    );
    };

    I’d rather not share specific site details on this public forum, but let me know if that is not enough to go on. Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @crystaljdesign

    This would work just fine.
    Can you please drop us a note via the plugin so we can check the URL?
    Thanks!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @crystaljdesign

    We received your email.
    Please continue correspondence there.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_is_mobile not working even with User Agent Groups activated’ is closed to new replies.