Support » Plugin: WP Mobile Detect » wpmd_is_windows_mobile() NOT working!

  • I’m testing this function in windows phone and it is returning false. I’m using this function to display a particular ad (ad1 below) for windows user, however, it always get ad2 in windows mobiles (Testing it on Windows mobile 7.5 on Nokia Lumina 710).

    <?php if (wpmd_is_windows_mobile()): ?>
     show ad1
    <?php else: ?>
     show ad2

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have resolved this.

    Just add the following code to wp-mobile-detect.php

    function wpmd_is_windows_phone() {
    	global $detect;
    	if( $detect->isWindowsPhoneOS() ) return true;

    You can now call the function wpmd_is_windows_phone in your theme to detect smart phones running windows.

    Be sure to also update the core class mobile-detect.php to the latest version from the

    double post

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wpmd_is_windows_mobile() NOT working!’ is closed to new replies.