My page title turns into a h2 tag - What to do?

admin2025-01-07  4

When i create a frontpage or another page or post, the titles i choose in the editor become h2-tags when the page or post is launched.

I would very much like this to be a h1-tag instead. Can i change this setting anywhere?

Theme name is 'Rocked' and my website is .

When i create a frontpage or another page or post, the titles i choose in the editor become h2-tags when the page or post is launched.

I would very much like this to be a h1-tag instead. Can i change this setting anywhere?

Theme name is 'Rocked' and my website is http://filmhygge.dk.

Share Improve this question edited Jun 22, 2017 at 10:23 kraftner 5,6281 gold badge29 silver badges46 bronze badges asked Jun 22, 2017 at 10:18 Mads GrønlundMads Grønlund 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

You need to alter the template files under the theme folder. In the folder template-parts there is content-page.php that renders the page (well, at least the part with the header) and content-single.php that has the single post's title part.

Just change the <h2> and </h2> tags to be <h1> and </h1> respectively on the <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?> part.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736255848a313.html

最新回复(0)