• Resolved Graham

    (@sandgroper)


    I have a 10 inch tablet and when I go to the forum it is showing the mobile version of the layout in landscape view. My container for single pages is set to a maximum width of 800 pixels.

    I could not find where the settings are for detecting the screen resolution that determines the cutoff point from desktop to mobile.

    Is it done via your plugin, or by my site’s theme? If by you, then where can I find the pixel setting where it switches?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello @sandgroper

    The detection happens in the file:
    includes\forum-thememanager.php

    There you can find the following check:
    if (wp_is_mobile()) {

    This WordPress core-function checks if you are using a mobile device or not and loads an additional CSS file if its the case. You can try to remove this part for testing purposes.

    Thread Starter Graham

    (@sandgroper)

    Thanks. I’ll check it out tomorrow.

    I noticed if I use Chrome on the tablet, I can choose to request desktop version, and then it appears normally – even though the displayed container width remains the same.

    Thread Starter Graham

    (@sandgroper)

    Found a way around it. Tested it using incognito windows on tablet.

    As first line in mobile.css add:

    @media (max-width: 768px) {

    And a closing

    }

    as the last line.

    • This reply was modified 8 years, 1 month ago by Graham.

    FYI – I use Chrome with the User Agent Switcher extension and can set to whatever mobile device desired and then use Chrome’s built in inspection tool to set desktop vs. mobile view and resize that inner window to test screen widths such as phone, tablet or whatever your media queries/breakpoint set.

    Note: The extension allows you to test on desktop or laptop device for rapid development/testing (on a dev site for example which is wise) without requiring an actual mobile device until final user acceptance testing on live site.

    Forgot to mention:

    @media only screen
    and (max-device-width: 768px) { … }

    I find setting to screen only and max-DEVICE-width targets mobile devices vs. just screen width alone and prevents interference with other media types such as specially printed print styles, etc. if exists. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How is Mobile Device Determined?’ is closed to new replies.