• Hi,

    with Goran, all pages have the same h1 & h2 text :

    – h1 = title of the site

    – h2 = “slogan” of the site in Title, description and logo settings

    That’s not good for SEO. I’d like to have different h1 & h2 on each page.

    How can I do please ?

    Thanks

Viewing 1 replies (of 1 total)
  • Hi @claude17!

    This kind of change would depend on where you wanted your h1 and h2s to be instead.

    Your first step will be to create a child theme so you can safely modify the tags without them getting changed back in a future theme update.

    Once you have a child theme activated on your site, you can make a copy of the parent theme’s header.php file and modify it so the site title and the slogan use a different tag.

    For the site title, the styles are dependent on it being an h1, so you would need some CSS to match the current design.

    For example, if you used a span tag instead of an h1 you could use the following CSS:

    span.site-title {
        margin: 0 auto 12px;
        font-size: 2.25em;
        line-height: 1.33333em;
        display: block;
    }

    From there you could create copies of other templates in your child theme and make other elements use the h1 or h2 tags as needed, and match up the CSS as you go ??

Viewing 1 replies (of 1 total)
  • The topic ‘h1 & h2 : same text on each page’ is closed to new replies.