Support » Fixing WordPress » Hide Attribute Per Page

  • I’m trying to hide an attribute on a specific page of my site. I see it as: h3#tagline. Any ideas as to how I would do this? CSS? Thank you!

Viewing 14 replies - 1 through 14 (of 14 total)
  • You can try:

    h3#tagline {
       display: none;
    }

    For additional help, you will need to post a link to your site.

    I tried that, no result. I am trying to hide the “tagline” on the page here: http://goodattorneysatlaw.com/articles/. Specifically what I want to do, is hide the phone number on this page, part of the “tagline”. Thank you, WOyogi

    Unfortunately, the tagline contains the name and phone number:

    <h3 id="tagline">
    Tax Law • Aviation
    <br>
    <b style="color: #CCC; font-size: .8em;">Offices: Naples, Miami (877) 771-1131</b>
    </h3>

    So there’s not a way to hide only part of it using CSS.

    There are no doubt other ways to do what you want – i.e. put the phone number in a separate piece of code. What are you ultimately trying to do – i.e. hide it only on one page or all pages or ??

    Since I cannot hide pieces of #tagline, just hiding all of #tagline on this one page will be great. I want it to appear on all other pages. Thank you!

    Okay, try this at the bottom of your style.css file (or custom CSS if you are using that):

    body.blog h3#tagline {
       display: none;
    }

    Thanks, but, nope, this has no effect.

    Where did you put the code?

    Added to the bottom of style.css.

    It’s not visible there – did you save the changes and clear any caches?

    Ah, that did work on that page, but, if I click on any of the individual blog posts, it re-appears. My hope, is to eliminate this display on all posts. Hope this makes sense, and thank you so much for your support!

    Ah, no problem – we just need to add a bit more code so it applies to the template for the single posts…see if add this does it:

    body.single-post h3#tagline {
       display: none;
    }

    That did it! Absolutely perfect! You are a genius! Can I possibly pay you for your time?

    LOL – that’s sweet and a very nice offer, but we do this for free here – and I don’t have a donation page at the moment, so I’ll take it as virtual good karma?!

    Well, a huge virtual good karma to you for your most excellent help, but I’ll be glad to send you a Starbucks or Amazon credit. Feel free to hit me up!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Hide Attribute Per Page’ is closed to new replies.