Skip to content

Instantly share code, notes, and snippets.

@brianleejackson
Last active July 31, 2022 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianleejackson/bebf8b667a5d6ada8c3deb5816789ff7 to your computer and use it in GitHub Desktop.
Save brianleejackson/bebf8b667a5d6ada8c3deb5816789ff7 to your computer and use it in GitHub Desktop.
Testing mobile cache buckets. This snippet echos out text only on desktop in the footer. If you see it on mobile, it means your mobile cache bucket isn't configure properly.
add_action('wp_footer', function() {
if(!wp_is_mobile()) {
echo 'hello world';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment