Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Created August 2, 2012 21:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramseyp/3241052 to your computer and use it in GitHub Desktop.
Save ramseyp/3241052 to your computer and use it in GitHub Desktop.
Using wp_is_mobile to conditionally load the search form in Twenty Eleven's header.php file
<?php
/**
*
* Wrap get_search_form with wp_is_mobile() to conditionally load the form in the header.
*
*/
if ( !wp_is_mobile() ) {
get_search_form();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment