Codex tools: Log in
Languages: English • (Add your language)
Contents |
This Conditional Tag checks if the user is visiting using a mobile device. This is a boolean function, meaning it returns either TRUE or FALSE.
<?php wp_is_mobile(); ?>
This tag does not accept any parameters.
<?php if ( wp_is_mobile() ) {
/* Display and echo mobile specific stuff here */
} ?>
wp_is_mobile() is located in wp-includes/vars.php.