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

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...

Senior Project Management Supervisor - Full Time Job Hiring

Senior Project Management Supervisor Anflo Realty Development & Allied Services Corporation is looking for a dedicated and professional Senior project management supervisor, if you feel you are fit to this job then we encourage you to apply this job, just follow the steps provided here. Job Type:  Part-Time Job Location:  Davao City Job Description: Educational Attainment : Bachelor’s Degree in Civil Engineering or Architecture  Gender/Age : Male or Female  Experience : At least 5-10 years of supervisory work Company Information Anflo Realty Development & Allied Services Corporation Anflocor Corporate Center  Damosa Complex Lanang  Davao City, Davao City  8000  Website: http://www.anflocor.com

Hayaan Mo Sila Lyrics - EX Batallion x O.C DAWGS Clean Version with JROA and King Badger

(O.C. DAWGS, Ex B!) Bosx1ne *(Pre-chorus): Kalimutan mo na yan, Sige-sige maglibang, Wag kang magpakahibang, Dapat ay itawa lang Ang problema sa babae dapat 'di iniinda, Hayaan mo sila ang maghabol sa'yo di' ba? Sabi ko naman sa'yo, lahat yan nagloloko, Pagkatapos kang pakinabangan biglang lalayo, Kaya wag nang uulit pa, Kaya wag nang uulit pa. Jnske: Eto na naman tayo, Kelan ka ba matututo? Pag-ibig ay sakit sa ulo, Kaya wag kang magpapaloko Bakit ba ang bilis mo na maniwala diyan? Di ka pa ba nadala sa 'yong nakaraan? Ilang beses pa ba na kitang papayuhan? Ayaw ko lang naman na ikaw ay masaktan. Hindi kita sa dina-down, down, down, down, pumili ka kase, Karamihan kasi now kung makuha madale, Madali nang magpakamot pag may nangate, Kaya ngayon palang mag-isip ka pre. King Badger: Pre dahan-dahan lang sa iyong pagkahibang, Sa isang nilalang na dapat nila-lang mo lang, Dapat kalimutan mo mga problema na yan, Dahil kahit san tingnan, ay yay yay, babae lang yan. Alam k...