How To Change Post Title From H2 tag to H1 – CHUNK theme

  • Unknown's avatar

    I’ve altered the font size of the post title to how I want it but because it’s a H2 tag, all H2 tags are also altered and huge. So all of my h2 tags within my content are way too big.

    I was thinking if I could change the post title to H1 tag I could get around this, but if there’s any other way I’d be very grateful thanks!

    comfortpit.com

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    You have used the “div.post h2” selector for styling the post titles instead use “h2.entry-title”. This selector applies the style only to the post title’s h2 element.

  • Unknown's avatar

    @a1jesin: His changes include the color, so he needs to target the title link rather than the title.

    @jonathonbrooks1989: You have added this:

    .entry-title a {
        color: #353535;
        font-size: 42px;
        font-style: normal;
        font-variant: normal;
        font-weight: 700;
        letter-spacing: normal;
        line-height: 52px;
        text-align: start;
        text-decoration: none;
        text-transform: none;
        vertical-align: baseline;
        word-spacing: 0;
    }

    This does exactly what you’re looking for, so simply delete this:

    div.post h2 {
        color: #353535;
        font-size: 42px;
        font-style: normal;
        font-variant: normal;
        font-weight: 700;
        letter-spacing: normal;
        line-height: 52px;
        text-align: start;
        text-decoration: none;
        text-transform: none;
        vertical-align: baseline;
        word-spacing: 0;
    }
  • Unknown's avatar

    Then turn this:
    .entry-title a {
    to
    .entry-title, .entry-title a {

  • Unknown's avatar

    Thanks for getting back to me a1jesin!

    And justpi, did what you said, worked perfectly! Thank you! :)

  • Unknown's avatar

    You’re welcome.

    For the record, a1jesin’s suggestion would have worked just as well. He only overlooked that you had already added the same code for “.entry-title a” (so you didn’t need to change div.post h2, you needed to remove it).
    And in my first reply I overlooked a couple of things! The link color was already taken care of (so my reply to a1jesin was wrong), and when you view a single post the title is not a link (hence my second reply).

  • The topic ‘How To Change Post Title From H2 tag to H1 – CHUNK theme’ is closed to new replies.