Tag Info

New answers tagged

0

You need to check that you aren't already on the mobile site: function redirecting_to_mobile_site() { if ( $_SERVER['SERVER_NAME'] !== 'm.example.com' && wp_is_mobile() ) { wp_redirect( 'http://m.example.com' . $_SERVER['REQUEST_URI'], 301 ); exit; } } add_action( 'template_redirect', 'redirecting_to_mobile_site' ); You'll ...



Top 50 recent answers are included