WordPress.org

Ready to get started?Download WordPress

Forums

Hide Attribute Per Page (15 posts)

  1. f1mktsol
    Member
    Posted 11 months ago #

    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!

  2. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    You can try:

    h3#tagline {
       display: none;
    }

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

  3. f1mktsol
    Member
    Posted 11 months ago #

    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

  4. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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 ??

  5. f1mktsol
    Member
    Posted 11 months ago #

    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!

  6. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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;
    }
  7. f1mktsol
    Member
    Posted 11 months ago #

    Thanks, but, nope, this has no effect.

  8. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    Where did you put the code?

  9. f1mktsol
    Member
    Posted 11 months ago #

    Added to the bottom of style.css.

  10. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    It's not visible there - did you save the changes and clear any caches?

  11. f1mktsol
    Member
    Posted 11 months ago #

    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!

  12. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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;
    }
  13. f1mktsol
    Member
    Posted 11 months ago #

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

  14. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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?!

  15. f1mktsol
    Member
    Posted 11 months ago #

    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!

Reply

You must log in to post.

About this Topic