Disable plugin for mobile users
Disable plugin for mobile users
Hello, I am having issues with post opt in form rendering correctly on mobile devices. The opt in box ends up lowering itself into the comments section. Is there a way I can disable all features of this plugin for mobile visitors?
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
Hi Jean thanks for the quick response. Right now I am still in testing mode and only have it active for administrators - I logged in on my iPhone as admin to test, I noticed the Footer opt in does not appear but the post opt in form does. Would you like me to reply with URL when I push plugin live so you can test?
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
For the css, i think about responsive design : http://www.alistapart.com/articles/resp ... eb-design/
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
I make a test on this page : http://www.wpsubscribers.com/beta/ with an optin form in the sidebar, if the screen is > 640px you see the form,
I use in css theme :
I use in css theme :
Code: Select all
@media screen and (max-width: 640px) {
#custom_optin_form_widget-2{
display:none;
}
}
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
normally this one work (depends of your template) :
you can see here : http://www.wpsubscribers.com/beta/version-1-43.html
Code: Select all
@media screen and (max-width: 640px) {
div#ia-optin-form{
display:none;
}
}
I tried adding this code to style.css and then simply adding to to end of post opt in in WPsubscriber settings but neither worked. Is there any other code I need to have to make it work?Jean-Christophe Bisoux wrote:normally this one work (depends of your template) :
you can see here : http://www.wpsubscribers.com/beta/version-1-43.htmlCode: Select all
@media screen and (max-width: 640px) { div#ia-optin-form{ display:none; } }
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
For me I add directly in header.php to test
if you use style.css, do you clean you cookies after ?
don't use the css custom from WPS it's not necessary
Code: Select all
<style>
@media screen and (max-width: 640px) {
div#ia-optin-form{
display:none;
}
}
</style>
don't use the css custom from WPS it's not necessary
-
- Posts: 283
- Joined: Tue Feb 28, 2012 10:36 am
- Location: Canillo, Andorra
Adding in header didn't work but I looked in my style.css and found this code:
/* Mobile */
@media only screen and (max-device-width: 480px) {
.entry-content {font-size:1em;}
.scrolltop {display:none;}
}
so I replaced with
/* Mobile */
@media only screen and (max-device-width: 640px) {
.entry-content {font-size:1em;}
.scrolltop {display:none;}
div#ia-optin-form {display:none;}
}
and I think that worked! I'll let you know if I have any issues with it. merci for all the help.
/* Mobile */
@media only screen and (max-device-width: 480px) {
.entry-content {font-size:1em;}
.scrolltop {display:none;}
}
so I replaced with
/* Mobile */
@media only screen and (max-device-width: 640px) {
.entry-content {font-size:1em;}
.scrolltop {display:none;}
div#ia-optin-form {display:none;}
}
and I think that worked! I'll let you know if I have any issues with it. merci for all the help.