Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1000233

    Hallo zusammen,

    Eine Seite angelegt (Home 1): Bilder (Skala zu passen) Bilder (Scrollen).
    Zweite Seite angelegt (Home 2): Bilder (Passend strecken) Bilder (fixiert).

    Für PC/ Laptop-Displays soll die Website (Home 1) angezeigt werden.
    Für Handy-Displays soll die Website (Home 2) angezeigt werden.

    Gibt es in WordPress eine Möglichkeit für die Website (Enfold Cild Theme: Freelancer), entweder die eine Variante (Home 1 für PC) oder die andere Variante (Home 2 für Handy) anzeigen zu lassen?

    Je nachdem, ob der Kunde ein Handy-Display oder einen PC-Monitor hat?

    In Anwendung: Enfold Child, Them Freelancer von Kriesi.at, WordPress 4.9.8

    Viele Grüße!

    #1000260

    well you can have a different landing page for that indeed:
    just do this to your functions.php of your child-theme:

    add_action( 'wp_head', 'landingpage_for_mobile', 10 );
    function landingpage_for_mobile() {
    ?>    
    <script>
    	if (window.location.pathname == '/' && jQuery(window).width() <= 480) {
    	   window.location = "/impressum/";
    	}
    </script>
    <?php
    }
    #1000270

    or if you only want it for mobile devices and not for small screens:

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

    impressum is just my test setting if it works on an Enfold Installation – you might adjust this to your needs

    #1000347

    Hi mkessler1,

    Please let us know how Guenni007’s solution worked for you.

    Best regards,
    Victoria

    #1000451

    it works on my end – but empty all cache types – especially that of the mobile, before you say it doesn’t work.
    I test all my advices beforehand.

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