-
CharbelNemnom
Hello Team,
Happy New Year!
On a post where there are existing comments (Example: https://charbelnemnom.com/secure-azure-file-shares-entra-private-access/), the “Leave a comment…” href #respond link with the class=”smooth-scroll” is set to <h4>. I need to change it to <h3> or <p>.
<h4><a href="#respond" class="smooth-scroll">Leave a comment…</a></h4>Google Pagespeed is complaining that Heading elements are not in a sequentially descending order.
See attached screenshot for more details: https://app.screencast.com/QvESqNSXcvrqyI already have the following filter to change the default “Leave a Comment” text, but not the headings.
add_filter( 'generate_leave_comment','tu_custom_leave_comment' ); function tu_custom_leave_comment() { return 'Let us know what you think, or ask a question...'; }I came across the following topic: https://generatepress.com/forums/topic/help-with-changing-a-heading/, which applies to the custom text “Let us know what you think, or ask a question…“, but it does not apply to the “Leave a comment…” above.
Your help is highly appreciated.
Thank You!
-
Alvind
Hi there,
Happy New Year!
This line:
<h4><a href="#respond" class="smooth-scroll">Leave a comment…</a></h4>is not output by the theme by default.
Are you using a child theme? If so, please check the
comments.phpfile in your child theme directory and make the changes there.Let me know how it goes!
-
CharbelNemnom
Hello @Alvind,
I appreciate your support.
Yes, I am using a child theme for GeneratePress, but I only have the
functions.phpfile.
How can I change it undercomments.php?I checked the
comments.phpfile under the parent GeneratePress theme, and I didn’t find any markup related to<h4><a href="#respond" class="smooth-scroll">Leave a comment…</a></h4>.Could you please provide more detailed information?
Thanks!
-
CharbelNemnom
Finally, I found out where it’s coming from. It was under Elements > Hook “generate_below_comment_title”. I changed it to h3.
Thanks! -
Alvind
Glad to hear that! 🙂
- You must be logged in to reply to this topic.