-
magisterschwarz
Mobile phones make my site look all out of sorts. Is there a way I can prevent viewers from seeing the site on mobile? It really is meant for desktop only.
-
Alvind
Hi there,
I’m not sure if there is a workaround for that. If a user opens the site on mobile, what should they be seeing then?
Maybe you need to write a JavaScript that displays a message telling the user that the site is not accessible on mobile.
-
magisterschwarz
“Maybe you need to write a JavaScript that displays a message telling the user that the site is not accessible on mobile.”
I think that’s exactly what I need to do. Could you let me know how to do it?
Thanks. I appreciate your help, as always!
-
Custom JS is out of the scope of the support forum, unfortunately.
You can try this CSS:
@media(max-width: 768px) { body { display: none; } html:before { content: "Please view on desktop"; padding: 10vh 5vw 10vh 5vw; display: block; text-align: center; font-size: 30px; } }Adding CSS: https://docs.generatepress.com/article/adding-css/
- You must be logged in to reply to this topic.