• Dear WordPress community,

    there are to places in the comments where the comment sections give out H3 headline tags. I want to convert them to normal text / div / span for SEO reasons.

    1) If there is a comment: “X Comments for ‘Article X’” (H3)
    2) Everytime: “Write a comment” (H3)

    Is there a way to write a custom function and wrap the headlines in new tags?

    Thanks so much!

    Best,
    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • Stef

    (@serafinnyc)

    You can just simply edit the comment.php file to your liking. I’d use a child theme to do so though.

    Thread Starter David181

    (@david181)

    Hi @serafinnyc,

    no way to find a solution via custom functions?

    Concerning the child theme, I do find the “X Comments for ‘Article X’” (H3), but not the “Write a comment” (H3). Where do I find it to replace it?

    Thanks and best,
    David

    Stef

    (@serafinnyc)

    I personally don’t know of any hook, because we all pretty much edit something like that in/on the file itself. It’s easier.

    That file should be inside the theme you are currently using.

    /themes/your-theme-name/comments.php

    Here, mine our H2 inside the TwentyNineteen
    https://imgur.com/WYimvSn

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom function: Replace Headline Tags in Comments’ is closed to new replies.