How to Change the Heading Tag for the Page/Post Titles?

From Astra Settings ( Edit Page / Edit Post > Astra Settings > Disable Sections > Disable Title ), you can enable or disable the Page/Post Title for the site. A Page/Post title is usually used to let the user know on which page he is currently on.

Are you looking to change the tag of Title – Like Page/Post title. You can use the below filters to change the Tag of the Titles.

By default this Title has heading tag <h1> in HTML structure. You can change this tag to any other HTML tag using the following filter

1. Above filter will change <h1> tag to <h4> tag. You can update it as per your requirement.
2. Paste the above code in the child theme’s functions.php file.

Note: The following functions astra_the_title_before_tag and astra_the_title_after_tag will contain the same heading tag as one is for the opening tag and the other one is for the closing tag, Just like we have used <h4> and </h4>

Default Tag

Heading Tag after adding the Filter

Not the solution you are looking for? Check other articles, or open a support ticket.