How to Change Pages/Posts Title Heading Level
It is well known that in the context of web publishing, titles play one of the essential roles. They are really important in providing both, readability for visitors, and important information for search engines.
Moreover, most of the web browsers display the webpage title at the top of the browser window and it needs to be eye-catching as well.
So today, we will learn how to adjust the title heading level for posts and pages on your website.
All adjustments for page’s title can be easily done in the content-page.php file. In order to locate it, navigate to wp-content\themes\themexxx\template-parts\page directory, using your FTP\hosting cPanel File Manager.
In the content-page.php file, locate the following code approximately on lines 13-20:
All you need, is just to replace
tags with the desired ones (for example, change them to
) and save the changes.
As for posts, navigate to the wp-content\themes\themexxx\template-parts\posts directory. There, you will see three basic folders for default, grid and single post pages layout. Decide on what layout you are trying to change the title heading level and adjust a file for it.
For example, let’s adjust the title for single post layout. Open the content-single.php file under the wp-content\themes\themexxx\template-parts\posts\single directory.
You will see the following piece of code approximately on lines 13-22:
tags changing them to the needed ones as we did for a page previously, and save the changes.
Congratulations! Good luck with the website!