Mobile version detector and hide some spots

Posted in: Newspaper
Post count: 42

Hi,

I just want to ask which code I should to use to detect mobile version in this template, like the way it detect for Ads Manager (on phone, on tablet).

I would like to use it to hide some spots, widget and footer sections.

Post count: 42

Anyone can help me ?

Post count: 1291

Hi,

It’s not an easy task, you have to look for a library or plugin which detects and returns the current device id or type. Then create condition to load each desired element based on what the plugin returns. Unfortunately i cannot provide a easy solution for this, my suggestion is to look for a professional developer to help you with this, if you don’t know any look for one on places like – http://studio.envato.com/

Thank you!

Post count: 42

Can I just use @media to detect screen size and set display:none to the div I don’t want to display ? I think it’s possible.

Post count: 6600

Hi,

Yes, you could but in that case the content still will be loaded just hidden. You can use the css code snippets I’ve pasted below to target each screen width and hide the blocks/widgets you donl;t want.

/* responsive phone */
@media (max-width: 767px){
add your css code here
}

/* responsive portrait tablet */
@media (max-width: 1018px) and (min-width: 768px){
add your css code here
}

/* responsive landscape tablet */
@media (max-width: 1140px) and (min-width: 1019px) {
add your css code here
}

/* responsive monitor */
@media (min-width: 1141px) {
add your css code here
}

Thanks

Post count: 42

Do you have any plan for the future version with these features ? I have suggested this for the team in the past but still not get it in most versions.

I think it would be great features to turn off some spots for mobile and tablet views. For example, you can turn off sidebar, header spots or footer spots in specific views (mobile, tablet), to make the mobile version is more faster and look great.

Post count: 6600

Hi,

We still have this suggestion on our list and we will consider your also as we do plan to change the mobile system/layout in the future but we haven’t decided on anything yet so I can provide any info on this at the moment.

Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.