Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wp_is_mobile() example
<?php
if ( wp_is_mobile() ) {
// Visitor is on a mobile device
} else {
// Visitor is on a desktop (not mobile) device
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.