Hey everybody I want to let you know that I have undertaken the grueling task of getting the heck away from WordPress. I was so sick of the problems and updates I had to do all the time. I am now using my ezbloo system and I am integrating all my old posts into the new system. It sucks, but in the end, I will save bundles of time. I needed to keep things simple and that is why I created ezbloo. I'll have more on this later for you guys after I am done with the total integration of my old posts here. So if you are looking for a post and need it faster, shoot me an email and I will make it a priority. [email protected]

How to redirect to mobile site

Redirect to mobile site because its easy! So you have your website set up and a mobile friendly site but you still need to redirect to mobile site. What we can do is use java script to figure out what size screen the user is using. If they surfer is using a smaller browser like that on a tablet or a cell phone we may want to redirect that person to out mobile site. I have included a script here that you should put in your head tags on your website. Now you can use this script to also point anyone with a smaller browser to any site that you wish but we will assume that you just want to direct them to another part of your website. Here is what the script looks like. In this script we are redirecting everyone that has a screen size 699 pixels or smaller to another part of our website. I also included an iPhone redirect script to tell iPhones where to go and it does not matter what their screen size is, lol.
<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "folder/index.php";
}
//-->
</script>
<script language=javascript>
<!--
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
   location.replace("https://www.a1websitepro.com/index.php");
}
-->
</script>

Redirect to mobile site is easy using this code all you have to do is replace the destinations.
redirect to mobile site

If you need lessons on how to edit php please visit our lessons page.