Redirect to other page when mobile

You could use wp_is_mobile with wp_redirect if ( wp_is_mobile() AND is_front_page() ) { wp_redirect( $location, $status ); exit; } You can add the js directly to a front-page.php or home.php file or enqueue it directly from either file. Example: add_action(‘wp_enqueue_scripts’, ‘load_script’); function load_script(){ wp_enqueue_script( ‘script-handle’, get_stylesheet_directory_uri() . ‘/js/your-script.js’, array( ‘jquery’ ) ); }

Moving an ASP Site to WordPress – Looking for Help on Redirects

Using Apache directives is definitely the well-known way to handle redirects. But I’m going to recommend another, easier-to-debug approach; just write your 301 Redirects in PHP using the ‘template_redirect’ hook provided by WordPress. The following question title links to my answer where I provide full code for solving your problem: Creating 301 Redirects for Post, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)