Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1121796

    There are several elements that do not work well on mobile. ‘Responsive’ does not address many content layout issues. How do I load a specific page when the site is being visited by a mobile device? (IE smartphone)?

    I can create a page that is perfect on mobile, but not so great on anything else. So, I create a ‘mobile perfect’ page, keep it off the main menu, but loads as the ‘landing page’ when visited by a mobile user.

    I’ve tried .htaccess redirects, but don’t know what the best method should be. Really need to get this going.

    Help? and Thank you.

    • This topic was modified 5 years, 4 months ago by zOrg.
    #1121860

    Hey zOrg,

    Maybe it would be easier to use the Screen Options options for each element in order to show/hide them for mobile devices?

    Best regards,
    Rikard

    #1122113

    Thank you for your quick response. I’ve tried that and it’s pretty great, but still a bit clunky. I’m NOT complaining at all. It’s a wonderful and quick feature. Thank you.

    #1122120

    if you really mean that it is only for mobile devices you an use this into your child-theme functions.php:

    add_action( 'wp_head', 'landingpage_for_mobile', 10 );
    function landingpage_for_mobile() {
    if(wp_is_mobile()){
    ?>    
    <script>
      if (window.location.pathname == '/' ) {
         window.location = "/imprint/";
      }
    </script>
    <?php
    }
    }

    in this case the imprint page will be the landing page for mobile devices.

    #1122214

    Super! Thank you… very much appreciated.

    #1122243

    Hi,

    Thanks @guenni007 for helping out :-)

    Please let us know if you should need any further help on the topic @zOrg.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.