Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1.  
  2. // add function in FUNCTIONS.php
  3. add_action( 'mobile_redirect' );
  4. if ( is_page( 'Download' )
  5.  
  6.     } else {
  7.     require_once( get_template_directory() . '/mobile_detect/Mobile_Detect.php');
  8.  
  9. global $detect;
  10. if ( class_exists( 'Mobile_Detect' ) ):
  11.         $detect = new Mobile_Detect;
  12. endif;
  13.  
  14. if( $detect->isiOS() ) {wp_redirect( 'https://itunes.apple.com/au/app/stashd/id714814803?mt=8'); exit(0); };
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement