Community Forums › Forums › Archived Forums › Design Tips and Tricks › Hide Soliloquy slider on mobile only
- This topic has 10 replies, 3 voices, and was last updated 12 years, 8 months ago by
Brad Dalton.
-
AuthorPosts
-
November 10, 2013 at 9:24 pm #72234
Loudness
MemberHi, 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.
November 10, 2013 at 10:06 pm #72242AnitaC
KeymasterPlease share a link to your site so I can take a look at your site.
Need help with customization or troubleshooting? Reach out to me.
November 10, 2013 at 10:09 pm #72243Loudness
Memberwell right now the site is back on local.... But I can paste the php here if you want to see the function.php file...
November 10, 2013 at 10:11 pm #72244AnitaC
KeymasterNo, 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.
Need help with customization or troubleshooting? Reach out to me.
November 10, 2013 at 10:13 pm #72245Loudness
MemberSo all I need to know then is to find the appropriate DIV used by the slider & use "display: none" in the appropriate media query ?
November 10, 2013 at 10:14 pm #72246AnitaC
KeymasterNovember 10, 2013 at 10:15 pm #72248Loudness
MemberOk, but it would still load the slider... that's not super mobile friendly (we are trying to reduce load time on mobile device) ?
November 10, 2013 at 10:18 pm #72251AnitaC
KeymasterWell, I guess I answered sorta incorrectly. You would target the slider code in the CSS not the DIV.
Need help with customization or troubleshooting? Reach out to me.
November 10, 2013 at 10:22 pm #72254Loudness
MemberCorrect 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.
November 10, 2013 at 10:28 pm #72256AnitaC
KeymasterOk, 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.
Need help with customization or troubleshooting? Reach out to me.
November 10, 2013 at 11:58 pm #72263Brad Dalton
ParticipantIf you want to use PHP code, you can conditionally prevent it from displaying on any type of mobile device using mobile conidtional tags.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.