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 8 months, 2 weeks 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

    anitac
    Participant
    Post count: 6991

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


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #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

    anitac
    Participant
    Post count: 6991

    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.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #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

    anitac
    Participant
    Post count: 6991

    Yes, that’s what I would do.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #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

    anitac
    Participant
    Post count: 6991

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


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #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 8 months, 2 weeks ago by  Loudness.
    • This reply was modified 8 months, 2 weeks ago by  Loudness.
    #72256

    anitac
    Participant
    Post count: 6991

    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.


    Let me help you customize your theme, responsive header, Buddypress, Agentpress or technical issue!
    Visit me here: Cre8tiveDiva.com | Tweet Me! | Plus Me!
    When asking for help, please provide a link or screen shot showing your problem!

    #72263

    braddalton
    Participant
    Post count: 8797

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


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.