SMThemes Support » BeautySecrets
How to deactivate mobile site on tablets
10 years ago
Mel
Member
My client has requested that their site keeps the mobile version active on cell phones but would like to have tablets view the desktop version of the website. I agree that the mobile site looks terrible on a tablet.
I found an article on completely disabling the mobile option; however, it doesn't help me with my concerns. This is what I've done so far: In library.php: I've changed... <link rel="stylesheet" href="<?php echo get_template_directory_uri()?>/css/wide.css" type="text/css" media="screen and (min-width:640px)" /> to state '640px' at the end instead of '1024px'. I've changed... <link rel="stylesheet" href="<?php// echo get_template_directory_uri()?>/css/tablet.css" type="text/css" media="screen and (min-width:640px) and (max-width:1023px)" /> to state... <link rel="stylesheet" href="<?php// echo get_template_directory_uri()?>/css/tablet.css" type="text/css" media="screen, projection" /> Within style.css, I took drastic measures and copied all of the 'desktop' info: @media only screen and (min-width:1024px) { #content-top { height:0; } #content-bottom { height:0; } #logo { position:absolute; left:50%; top:15px; } #logo img { margin-left:-50%; } .menusearch { float:left; margin-top:20px; } .articles .post-caption { padding:1px 30px 0; } And placed it under 'tablet', replacing what was there. I did this in case other files were referring to tablet so removing it completely may have messed things up. Nothing I've done works though. What am I missing here? Thanks! |
10 years ago
Mel
Member
Sorry, I forgot to mention that I changed that top line in the css file from:
@media only screen and (min-width:1024px) to @media only screen and (min-width:640px) |
10 years ago
Mel
Member
I was looking at the code in wp-content and it would appear that 'jetpack' is controlling the appearance of the site on tablets and mobile devices. So much so that when I deleted 'tablet.css' completely to see if it even had any impact on the site whatsoever, it did nothing. This is the strangest coding I've ever seen in my life.
How does one disable this Jetpack stuff? A file called 'class.jetpack-user-agent.php seems to listing every type of mobile device known to man kind. |
Leave a reply
Search by forum
SMThemes.com Support
-
Categories
- Framework
- Themes
- Affiliate Company
- Sponsorship Useful pages
- How to start using our themes
- Contacts