I just need to find out how to detect if the user is on a mobile device, and ask them if they want to see the mobile instead of the regular site, and redirect accordingly. Is there a non-PHP solution? Or a WP plugin?
Asked
Active
Viewed 711 times
2 Answers
1
Read this previous Questions:
Detect Mobile using Jquery & PHP:
What is the best way to detect a mobile device in jQuery?
Auto detect mobile browser (via user-agent?)
Or Using this stuff to check if user using mobile device you can show dialog box for redirect it:
![](../../users/profiles/-1.webp)
Community
- 1
- 1
![](../../users/profiles/515536.webp)
Joko Wandiro
- 1,887
- 1
- 16
- 27
0
Nowadays Responsive Design (here and here) is the prefered path to take.
Though not a direct answer to you question but this would be the path I'd take instead.
Edit:
If you want to do this in Javascript/jQuery you can ulitize Modernizr for feature detection instead of fixed browser detection.
If you want strict browser detection you can check the UserAgent and take appropriate action.
![](../../users/profiles/26742.webp)
Sani Singh Huttunen
- 21,744
- 5
- 66
- 73
-
I'd do this but the client specifically requested this. – user1230790 Sep 24 '12 at 09:54