[Support request] Display rules for elements based on screen size

Home Forums Support [Support request] Display rules for elements based on screen size

Home Forums Support Display rules for elements based on screen size

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1018158
    Steven

    Is there a way to exclude an element based on mobile/tablet/desktop? If not, that’d be a great option on the display rules screen.

    #1018173
    David
    Staff
    Customer Support

    Hi there,

    Server side detection of the device size can be rather hit and miss due to continuous changes in mobile tech. So we’re not confident it would be a stable solution.
    You could use an element display filter to remove the element using the wp_is_mobile() function as a condition and see how it goes:

    https://developer.wordpress.org/reference/functions/wp_is_mobile/

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