-
AuthorPosts
-
August 22, 2018 at 11:41 am #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!
August 22, 2018 at 12:30 pm #1000260well 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 }August 22, 2018 at 12:37 pm #1000270or 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
August 22, 2018 at 2:27 pm #1000347Hi mkessler1,
Please let us know how Guenni007’s solution worked for you.
Best regards,
VictoriaAugust 22, 2018 at 6:00 pm #1000451it 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. -
AuthorPosts
- You must be logged in to reply to this topic.
