add_action( 'wp', 'homepage_mobile_redirect' ); function homepage_mobile_redirect() { if ( wp_is_mobile() AND is_front_page() ) { wp_redirect( '/mobileshop/', 301 ); exit; } } -or- if (document.documentElement.clientWidth <760) { window.location = "/webshop"; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter