Page 1 of 1

Disable plugin for mobile users

Posted: Wed Aug 29, 2012 6:13 pm
by maxasher
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?

Posted: Wed Aug 29, 2012 6:22 pm
by Jean-Christophe Bisoux
Hi,
Normaly WPS is not activated on mobile device, cans you send me the url of your web and also with wich mobile you have this issue ?

Posted: Wed Aug 29, 2012 6:24 pm
by maxasher
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?

Posted: Wed Aug 29, 2012 6:36 pm
by Jean-Christophe Bisoux
Yes, you are true for the optin form it's not disable , i'm sorry at this time it's not posible to disable for mobile, do you try with css to correct this issue ?

Posted: Wed Aug 29, 2012 6:38 pm
by maxasher
The problem is I adjusted the height so it doesn't have a large gap at bottom when viewing from a computer, however when its on an iPhone the height isn't large enough. Is there a way to use CSS so it appears taller on mobile devices but not on computers?

Posted: Wed Aug 29, 2012 6:45 pm
by Jean-Christophe Bisoux
For the css, i think about responsive design : http://www.alistapart.com/articles/resp ... eb-design/

Posted: Wed Aug 29, 2012 7:05 pm
by maxasher
I tried to change body for mobile phones with mobile CSS but it didn't change anything

body {
-webkit-text-size-adjust: 60%;
}

Posted: Wed Aug 29, 2012 7:17 pm
by Jean-Christophe Bisoux
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 :

Code: Select all

@media screen and (max-width: 640px) {
  #custom_optin_form_widget-2{
      display:none;
  }
} 

Posted: Wed Aug 29, 2012 7:19 pm
by maxasher
Nice, what call would I use for the post opt in form? #post_optin_form

??

Posted: Wed Aug 29, 2012 7:30 pm
by Jean-Christophe Bisoux
normally this one work (depends of your template) :

Code: Select all

@media screen and (max-width: 640px) {
  div#ia-optin-form{
      display:none;
  }
} 
you can see here : http://www.wpsubscribers.com/beta/version-1-43.html

Posted: Wed Aug 29, 2012 7:39 pm
by maxasher
Jean-Christophe Bisoux wrote:normally this one work (depends of your template) :

Code: Select all

@media screen and (max-width: 640px) {
  div#ia-optin-form{
      display:none;
  }
} 
you can see here : http://www.wpsubscribers.com/beta/version-1-43.html
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?

Posted: Wed Aug 29, 2012 7:49 pm
by Jean-Christophe Bisoux
For me I add directly in header.php to test

Code: Select all

<style>
@media screen and (max-width: 640px) {
  div#ia-optin-form{
      display:none;
  }
}
</style> 
if you use style.css, do you clean you cookies after ?

don't use the css custom from WPS it's not necessary

Posted: Wed Aug 29, 2012 8:09 pm
by maxasher
I tried adding that code in style.css as well as the custom css at end of post opt in, but it didn't work for either. Is there any additional code I need to add to make it function? Thanks for all your help.

Posted: Wed Aug 29, 2012 8:15 pm
by Jean-Christophe Bisoux
No, nothing more and just in your theme not in wps css custom

Try to add directly in header.php and clean your cache

Posted: Wed Aug 29, 2012 8:31 pm
by maxasher
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.