Question

I'd like to hide the site title that appears on the sidebar on a twentyfifteen theme WordPress website when viewing it in a desktop display, but have it show when the display is fitted for mobile or tablet view (and a dropdown hamburger menu shows instead of a sidebar).

Ideally, I'd like to accomplish this through CSS. I couldn't see any unique CSS id's or classes applied to the body when resizing from desktop to mobile, so I can't figure out a way to do something like;

.site-title { display: none; }

but have it apply in the desktop view only. Any suggestions on how I could accomplish this? I'm also open to solutions via adjusting the theme PHP files if need be (via a child theme).

Was it helpful?

Solution

This should do it for you.

@media screen and (min-width: 59.6875em){
  .site-title {
     display: none;
  }
}

I'm new here so I'm not sure why the downvotes.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top