R
R
Rustam Kartoev2018-07-14 12:53:48
WordPress
Rustam Kartoev, 2018-07-14 12:53:48

How to close the site from desktop browsers...?

Hello. there is a site on WordPress, there was a task to hide the site (so that if you go from a computer, the site simply does not open, you can make a blank page) from desktop browsers. the site should only work if accessed from a mobile or tablet.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrej Sharapov, 2018-07-14
@Madeas

you can write something like this via css:
@ media min-width(1200px) {
class/id of your container {
display: none;
}
}

A
Artem Gvozdev, 2018-07-14
@arty23_03

Well, this can be done through css, but it’s still more logical not to display a blank screen, but an inscription that you need to enter from mobile devices

Z
zorca, 2018-07-14
@zorca

You can check in the template through a conditional tag: https://wp-kama.ru/function/wp_is_mobile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question