• Resolved civilvicky

    (@civilvicky)


    I want the block to be sticky only on tablet and laptops. While viewing on any smartphone it should not be sticky.

Viewing 1 replies (of 1 total)
  • Plugin Author Senff – a11n

    (@senff)

    Hey @civilvicky

    It is not possible to detect if a device is actually a tablet, laptop, smartphone, desktop, etc.

    What the plugin can do, is detect the user’s screen size, and then decide if a block needs to be sticky or not. To do that, enter a value in the “Block should not be sticky if the screens smaller than” setting:


    Image link: https://d.pr/i/usnsqg

    If you enter 1024 there, it means that the block will be sticky on screens that are wider than 1024 (mostly laptops, and tablets), and if the screen is smaller than that (mostly smartphones), it will not be sticky.

    There’s no “magic” number here to use. Some smartphones are quite big, and some tables are quite small, so if you would use a number like 800, it’s possible that large smartphones will show it as sticky, and small laptops won’t, but you’ll have to experiment a bit with that.

Viewing 1 replies (of 1 total)
  • The topic ‘sticky only on laptop and tablets’ is closed to new replies.