Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS What code to specify for hiding header on a blog page

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #159086
    pingmeister
    Participant

    My blog page has that header with yellow background (Cartoon Latest: ToonBlog) directly above my red banner. Since this is a “post” page, can anyone recommend a specific code to hide / delete that yellow background header with text? I will add it to my “style.css” or to my Edit>CSS. Thank you for any assistance, and btw Merry Christmas.

    #159089
    Senff
    Participant

    You want it removed everywhere? Or just archive pages? Or just this specific page?

    #159090
    pingmeister
    Participant

    Hi Senff: Just this specific page but that’s the reason I’m wondering because it’s actually a “post” and not a “page” per se (in essence, I don’t believe it has the typical page-id-etc. that would assist in writing a directive) – so just to get it off this page or post, I am curious the best approach.

    #159093
    Senff
    Participant

    Alright. If you inspect the page, you’ll see that the element in question is h1 class="archive-title" so you’ll have to target that.

    You’ll also see that the body has a bunch of classes:

    <body class="archive category category-toonblog category-7015 custom-background custom-font-enabled infinite-scroll neverending" ....
    

    Some of those classes are unique, others are not. So for example, if you want to hide the element any page that shows all posts of category “toonblog”, you’ll have to use:

    body.category-toonblog  h1.archive-title {display:none;}
    

    If you want to hide the element on any page that shows all posts in any particular category, you’ll have to use:

    body.category  h1.archive-title {display:none;}
    

    If you want to hide the element on any page that shows posts in any archival way (sorted by category, sorted by author, sorted by date, or anything else), you’ll have to use:

    body.archive  h1.archive-title {display:none;}
    

    And so on…

    #159094
    pingmeister
    Participant

    Senff:

    I PROMISE I added this code: .category-toonblog #content .archive-title { display: none; }

    before getting your latest info here. I did recall you saying previously to focus on that “class” aspect and when I was experimenting with Firebug and reviewing what’s behind that “post” page, I decided to use the above as an experiment. Viola….it did work but do you think the directive “#content” is also needed? Your latest information is also being saved / archived for reference purposes. Just so you know, I was very intimidated with WP at first….then when I messed about with actual “style.css” basics, I was even more initimdated. However, with your upfront and straight forward suggestions, I am slowly understanding. I look back when I began editing with Frontpage (am I all owed to use that name here?) and a moderator asked me to tweak some HTML….but that was over 10 years ago.

    #159096
    pingmeister
    Participant

    Senff:

    Addendum to my previous response. Based on your information regarding unique classes….I am still attempting to learn how to get the “Leave a Reply” Comments box to appear on the blog pages whenever I make new future posts. I “hid” or deleted the box via some directives in the past. However, I realize it’s based on the #respond call out.

    My question then is regarding if there is an inherit value I can add in the “style.css” to allow the “Leave a Reply” to only show on the blog post pages………….

    #159103
    Senff
    Participant

    .it did work but do you think the directive “#content” is also needed?

    It depends on other declarations of styles. Look into css specificity.

    Anyhoo, I’m sure you get intimidated by this stuff, especially since you’re trying to learn both CSS and WordPress at the same time. I would suggest to first get a good (VERY good) grasp at CSS. Not something you’ll get in just a few days, but it also won’t take years.

    Once you feel comfortable with the basics of CSS and HTML (in other words, when you’re not directly intimidated by it anymore), you might want to dive into WordPress.

    In my opinion, it’s not very efficient to try and learn multiple skills at the same time.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.