• Resolved Halil ESEN

    (@halilesen)


    Hi Ben,
    You know, I do a lot of customization on the theme and site. I’ve been messing around with the comments section lately.

    As far as I know the commenting part is pulled from WordPress core. However, in that part, the title was mistranslated in Turkish in a way that I don’t like.

    Is it possible to manually add this comment section in WordPress to the theme? After all, I don’t want to make corrections over and over with every update.

    If that happens I’ll add a link like “You’re commenting as a guest, log in” below the header of the Commenting area.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Yea you can do that. Copy the comments.php file into your child theme, and then you’ll only have to make the update once.

    If the text you want to edit is coming from WP core, then you’ll want to edit the comment_form() function, like this:

    comment_form([
    'title_reply' => 'My new next'
    ])

    That function shows up a few times, so you’ll want to edit it like that every time you see it.

    Thread Starter Halil ESEN

    (@halilesen)

    How to generate full code for the function? functions.php file is not accepted as it is. I’m not very good at JS.

    Theme Author Ben Sibley

    (@bensibley)

    You don’t need to edit functions.php for this. Instead, copy the comments.php file from Mission News into your child theme. Then inside the comments.php file in your child theme, find this function:

    comment_form()

    It shows up in three places in that file. Edit all three to look like this instead:

    comment_form([
    'title_reply' => 'My new text'
    ])

    That gives the comment_form() function one argument that changes the title above the comment form to “My new text.” You can edit “My new text” to whatever you’d like the title to say.

    Thread Starter Halil ESEN

    (@halilesen)

    Understood. Thank you so much.

    By the way, it was only in one place in the file. I don’t know, maybe I played on it before.

    Thanks.

    • This reply was modified 2 years, 4 months ago by Halil ESEN.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Related to Commenting Area’ is closed to new replies.