• Resolved tnightingale

    (@tnightingale)


    I’ve recently started building FSE custom sites instead of hand-coded themes, and your plugin is a very handy replacement for “wp_is_mobile()”. However, I’ve noticed that the Device Type setting for “Mobile” includes tablets, and I want them to display like DT.

    Using Screen Size rules is not an option in most instances since I’m dealing with images and don’t want to slow down the mobile view.

    I usually use the “Mobile Detect” plugin which excludes tablets from wp_is_mobile(), but it has no effect on your plugin, so I’m assuming you’re not using wp_is_mobile().

    Is there a code snippet I could add that would exclude tablets from the Mobile category?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi @tnightingale,

    You’re correct, Block Visibility does use wp_is_mobile(). There is currently no way to modify the current implementation to exclude tablets. That said, the codebase is available on GitHub and contributions are welcome!

    Best,
    Nick 

    Thread Starter tnightingale

    (@tnightingale)

    Actually I thought Block Visibility must not be using wp_is_mobile(), because the Mobile Detect plugin, which alters wp_is_mobile() to exclude tablets, seems to have no effect on your plugin (it works as expected in custom themes). I will test again, maybe it was showing me a cached version.

    Thanks for the response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.