Site logo

Archived topic

H1 Post

15 replies · Started by Giuseppe on June 2, 2019

Viewing posts 1–15 of 16

When I create an post and write its own H1, if I go to the blog's home page, the H1 written is turned into H2 on the blog's homepage. Why?

Even the titles of the posts, present in the category page, are transformed into H2.

Is it possible to transform the H2 of the post, present on the blog home page and in category page in H3?

In this way, I avoid the counting of H2 duplicates by the crawlers.

Thanks

Hi Leo

I read David's motivations for not changing the H2 in H3.
But there is a seo problem, the duplication of H2.
In this way, in fact, an H2 is created on the blog home page and another identical H2 is created on the category page to which the article belongs.

For this I would like to change the H2 to H3 or keep H2 on the blog home page while on the article category page, turn H2 into H3.

Thanks

Hi Leo

the linked file already contains the change to transform the H2 into H3 or what do I have to change inside the file to get this result?

Thanks

Hi David,

could you explain to me how do I access the content.php file and how can I change it?

Thanks

The content.php file would be directly in the theme's folder (wp-content > themes > generatepress).

You can download a theme's file here, or directly from the link.

You would need to copy the file, paste it into your child theme, then make the change to line 34 of the file as David suggested.

Hi Leo

I changed line 34 of the file as David explained in this way :

the_title( sprintf( '<h3 class="entry-title" itemprop="headline"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );

I saved the file and uploaded it to the childtheme folder (by FTP), but does't works, because the titles of posts on the blog home page and in the category pages continue to be H2.

Can you link us to the page in question?

Hi Leo

in private there is link of blog home page where the post titles are still in H2 despite the change.

Also in the category page they continue to be in H2

Thanks

Is the child theme actually activated under Appearance > Themes?

Hmm any caching issue?

I just tried the exactly same thing and it worked without any issues:
https://www.screencast.com/t/XLxsbH5k

Make sure the content.php file is directly under the generatepress_child folder.

You should also see style.css and function.php at the same level.

Hi Leo,

I tried the procedure again, now it works!

Perfect!

Thanks a lot

This archived topic is closed to new replies.