Hide Soliloquy slider on mobile only

Community Forums Forums Design Tips and Tricks Hide Soliloquy slider on mobile only

This topic is: not resolved

Tagged: ,

This topic contains 10 replies, has 3 voices, and was last updated by  braddalton 1 year, 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #72234

    Loudness
    Participant
    Post count: 38

    Hi, I have a Soliloquy slider on a static home page (home page only). I would like to prevent this slider to show & load on mobile device (phones), I’m using the theme streamline.

    Is it possible to prevent some PHP code to execute on mobile ? We also have the Zopim chat we would like to prevent from loading on phones resolution.

    #72242

    AC
    Blocked
    Post count: 7712

    Please share a link to your site so I can take a look at your site.

    #72243

    Loudness
    Participant
    Post count: 38

    well right now the site is back on local…. But I can paste the php here if you want to see the function.php file…

    #72244

    AC
    Blocked
    Post count: 7712

    No, I wanted to check out the style sheet using Firebug. I could then target the specific areas. It’s hard to do it when you just paste the code – at least for me it is. I’ll let someone else try to help you on this then.

    #72245

    Loudness
    Participant
    Post count: 38

    So all I need to know then is to find the appropriate DIV used by the slider & use “display: none” in the appropriate media query ?

    #72246

    AC
    Blocked
    Post count: 7712

    Yes, that’s what I would do.

    #72248

    Loudness
    Participant
    Post count: 38

    Ok, but it would still load the slider… that’s not super mobile friendly (we are trying to reduce load time on mobile device) ?

    #72251

    AC
    Blocked
    Post count: 7712

    Well, I guess I answered sorta incorrectly. You would target the slider code in the CSS not the DIV.

    #72254

    Loudness
    Participant
    Post count: 38

    Correct me if I’m wrong… :

    The CSS load after the function.PHP code. So that mean if I prevent the slider to load using CSS, the slider would still load in the background, since it is loaded by a PHP “request”, but it just wont show since disabled at the very end by the display:none in the CSS.

    We would like to completely prevent the slider from loading, from the very begining, when a mobile device (phone) is detected.

    • This reply was modified 1 year, 1 month ago by  Loudness.
    • This reply was modified 1 year, 1 month ago by  Loudness.
    #72256

    AC
    Blocked
    Post count: 7712

    Ok, then you need one of the other more experienced PHP developers to do this for you. You can wait it out for someone to respond or maybe visit wpsites.net and see if Brad can help you.

    #72263

    braddalton
    Participant
    Post count: 10683

    If you want to use PHP code, you can conditionally prevent it from displaying on any type of mobile device using mobile conidtional tags.


Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.