i have created a wordpress website mobile version. now i’ve to deploy it on live server on the same url as for normal web version. my problem is how i check that the accessing device is mobile and move it to the mobile version of URL. Suggest The code in header file or any other change in any file.
Leave a Reply
You must be logged in to post a comment.
Try to use
This Conditional Tag checks if the user is visiting using a mobile device. This is a boolean function, meaning it returns either TRUE or FALSE.
http://codex.wordpress.org/Function_Reference/wp_is_mobile
e.g.
I’ve used this check for mobile browser in header.php of wordpress theme and it works very fine and well for me.
Helping link for me
WordPress Mobile – Change Part of the URL Instead of Redirecting to the Front Page?
https://github.com/serbanghita/Mobile-Detect
put file in your wordpress theme folder