Archived topic
Remove H3 Tag in Leave a Comment
11 replies · Started by Phuoc on August 8, 2019
Hello Support,
How can i remove <H3> tag (Replace to <p> tag) in this?
https://prnt.sc/oqawrr
Thanks
Hi there,
You will need to create a child theme:
https://docs.generatepress.com/article/using-child-theme/
Copy and paste the comments.php file in the child theme folder:
https://github.com/tomusborne/generatepress/blob/master/comments.php
Then make changes to line 44 and 62:
https://github.com/tomusborne/generatepress/blob/master/comments.php#L44
https://github.com/tomusborne/generatepress/blob/master/comments.php#L62
Let me know if this helps :)
Hello Leo,
This edit only change the "comments-title" , the "Leave a Comment" text not change.
Hi there,
you can use the filter i provided here:
https://generatepress.com/forums/topic/change-h3-in-comments/#post-821318
Thanks David Very much.
You're welcome
David, is there a filter to remove the H3 without resulting in using a child theme?
You can use the Code Snippets plugin to add the filter.
What I mean is if this comment has a snippet?
If you want to make changes to the comments template then a child theme has to be used. Some of the comments.php is not filterable at this time
There is no need then to use a child theme for just that one feature, though it is flagged on accessibility checkers.
If he wants to change the <h3> and keep the modification through updates, then a child theme is needed.
Using a child theme should have minimum impact on a site.