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).

  • Well I'd at least like to figure out why I'm getting downvotes for asking this question, so I know better for the future. Thanks. – astrosa Apr 4 '16 at 2:13

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.

  • That did the trick. Thank you so much for your help! – astrosa Apr 4 '16 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.