title: Hiding WordPress sidebar if on phone only, not iPad, tablet, etc…
body: <p>I have Google AdSense on my site’s my sidebar but it looks horrible on a mobile phone. The goal is to remove the sidebar if it’s viewed on a mobile device, but keep it everywhere else. So if it’s on a mobile device hide it, but desktop and tablets show it.</p>
  
  <p>If have found this:</p>
  
  <pre><code>if (wp_is_mobile()) {
      // hide sidebar
  } else {
      dynamic_sidebar( 'sidebar-1' ); 
  }
  </code></pre>
  
  <p>Which works, but obviously hides it on all mobile devices including tablets. Is there another function perhaps that is just for phone size screens? I have tried to use media queries in the css but to no avail!</p>