Blog title still showing despite "display:none" in custom CSS

  • Author
    Posts
  • #1293451

    janepell
    Member

    Hello,

    I added this code to my custom CSS for the theme Tarski:
    #blog-title {
    display: none;
    }

    …because my blog title/name is in my header image.

    It removed the blog title (name) from only the home page, but not subsequent pages. At one point, it worked fine but seems to have reverted to showing up on inside pages.

    Any ideas?

    Thank you,
    Jane

    The blog I need help with is enoughgood.wordpress.com.

    #1293564

    justpi
    Member

    The blog title needs a different selector for the other pages. Change your code to this:

    #blog-title, span#blog-title {
    display: none;
    }

    #1293566

    janepell
    Member

    Hello Justpi,

    Thank you. However, I’m getting a little warning icon next to the code. The word “span” is highlighted red.

    Can you look at the code you gave me to see what might be wrong?

    Thanks.

    #1293567

    janepell
    Member

    Me again.

    I had asked this question before and someone told me to just add:

    span#blog-title {
    display: none;
    }

    which I did and it worked, temporarily, but not anymore. I’m getting the yellow warning sign for that one, too.

    #1293569

    justpi
    Member

    You’re welcome.

    a) Ignore the warning. The selectors I gave you are the right selectors for Tarski, the warnings aren’t WP’s, they are opinionated, and they can be wrong (as in this case).

    b) You’re referring to this thread:
    https://en.forums.wordpress.com/topic/hiding-blog-title-in-custom-css-from-all-not-just-home-pages?replies=4#post-1262317
    Thesacredpath was one of our most experienced forum volunteers, and he meant the exact same thing I suggested: he didn’t tell you to replace your code with his, he told you to add his code. The only difference between his suggestion and mine is that it’s better to avoid redundancies. Instead of using this:

    #blog-title {
    display: none;
    }
    span#blog-title {
    display: none;
    }

    it’s better to use this:

    #blog-title, span#blog-title {
    display: none;
    }

    #1293589

    janepell
    Member

    Great. All is good now.

    I didn’t think to check that your code worked, not realizing there was such a thing as an opinionated warning : )

    Love SacredPath.

    #1293656

    justpi
    Member

    Hehe, you’re right, the warning itself cannot be opinionated! Naturally I meant that those who designed these warnings have some exaggerated views re what is or isn’t correct CSS. And anyway, even if it was better to avoid a selector like span#blog-title, that’s the selector the designer of Tarski used, so you have to use it if you want to target that particular element.

The topic ‘Blog title still showing despite "display:none" in custom CSS’ is closed to new replies.