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.
If have found this:
if (wp_is_mobile()) {
// hide sidebar
} else {
dynamic_sidebar( 'sidebar-1' );
}
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!