Langsung ke konten utama

How To Set Specific Page from Homepage for Mobile Viewing in WordPress 4.8.1 Site

How To Set Different Page When Viewing Mobile or Smartphones in WordPress?

This is the common things we encounter when we wanted to see different page on our website when we view using our smartphones or mobile devices from our website blog or any other website, this simple solution is very useful to improve user experience and to make your landing page or homepage load faster, this solution is effective for iPhone 4, iPhone 4s, iPhone 5, iPhone 5s, iPhone 6, iPhone 6s, iPhone 6s Plus, iPhone 7 and any other devices, you just only need to set the specific screen sizes from the code we are going to provide below.

//* Redirect homepage on mobile
add_action( 'wp_head', 'wps_params', 10 );
function wps_params() {
    ?>
 <script>
 if (window.location.pathname == '/' && jQuery(window).width() <= 480) {
    window.location = "http://yoursite.com/mobile-page/";
 }
 </script>

    <?php

}

Steps On Placing The Code

  1. You need to login as administrator from your WordPress site.
  2. Go To Appearance>Editor and locate the functions.php
  3. Copy the code provided above and then paste it to the functions.php at the end of the functions.php code.
  4. the 480 numbers if you want to include the iPad or other screensize from this.
  5. Now set the link you wanted when users trying to access the homepage of your website they will redirect to see the mobile page you set from the code.
Hope this simple guide is helpful and also if you wanted to have more interesting video tutorials I suggest you subscribe the "Bryan WordPress Journey" YouTube channel.

Komentar

Postingan populer dari blog ini

Everwing Permanent Coin and Thropy 9999999 Hacked 2017

How To Hack Everwing Using PC Browser Opera , Chrome and Mozilla Firefox Are you one of Everwing addicts and wanted to get many coins and trophy to upgrade and get legendary dragon to achieved instant successful play on this popular game from Messenger? well today we will going to provide you a tutorial on how you can get the Everwing hack 2017. NOTE: Everwing hacked provided here is intended for educational purposes only, we are not responsible for any circumstances you might encounter, this hacked is for fun only and this is tested for many users. Things To Consider Before Doing the Hacking Process  You will need to use your PC to make this work, and also you need to use a browser listed below. Opera Browser (Recommended) - This is tested for our staff and it works. Google Chrome Mozilla Firefox Now after you open your PC and then open browser, just go to Messenger.com and then load the Everwing game , then select the character and then right click + inspect element, now next th

Things You Didn't Know About Kiwi Fruit and It's Health Benefits

Kiwi or Kiwifruit have many names in different country. Chinese gooseberry is most popular secondary name for this fruit. It is a small ( about the large size of hen’s egg ), light colour brown and a fuzzy skin covered in the outside. Then the inside is a colour lime green having a small tiny black seeds that make it an eye catching. Kiwifruit is native in China and its said to be their National Fruit. It is first cultivated in New Zealand and known as Chinese gooseberry. Kiwifruit is said to be having more Vitamin C than Orange. Kiwifruit is a soft creamy and sweet but a unique taste. Natural List Contain by KIWI as follows: Vitamin A – 3 mcg Vitamin C – 105.4 mg Potassium – 215mg to 252mg ( depends on type of KIWI ) Dietary Fiber – 2. 7 g Protein – 0.8 g Total fat – 0.4 g Iron – 0.2 g Folate – 17 mcg Copper – 0.09 mg Vitamin E – 1.01 mg Manganese – 0.07 mg Vitamin B6 – 0.063 mg Vitamin A equiv. lutein zeaxanthin - 114 μg HEALTH BENEFITS OF KIWI FRUIT Protects DNA – be

BOOTYFUL Lyrics by Ex Battalion

"Bootyful" (feat. Jroa, Emcee Rhenn, Flow-G, Brando & Bosx1ne) Let me see the booty baby show me baby And let's start around Let me have good look at baby Shake your booty now Let me see the booty baby show me baby And let's start around Let me have good look at baby Shake your booty now Let me see the booty baby show me baby And let's start around Let me have good look at baby Shake your booty now Girl you're so bootyful that ass so beautiful Girl you're so bootyful that ass so beautiful (Emcee!) Katawan na pambihira Kaya madaming nakapila Gusto nilang iuwi ka 'Di mo ko kilala pero sa'kin ka sumama Kanina pa kita pinagmamasdan The way you drop it down low ayaw kong pakawalan At hindi ako kuntento na titigan lang iyan I want your really ass baby pwede sa'kin ka lang Kaya 'wag ka mag atubili talikod patingin Baka pwede maka hawak sa pwet ay papisil Wala na'kong paki malinaw man o madilim O kaya naman maingay kahit tirang pahilim Laha