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.
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
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.
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.
Super! Thank you… very much appreciated.
Hi,
Thanks @guenni007 for helping out :-)
Please let us know if you should need any further help on the topic @zOrg.
Best regards,
Rikard