• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Programming / Modify Comment Parent WordPress Plugin
A larger speech bubble with a smaller speech bubble inside it.

Modify Comment Parent WordPress Plugin

Last updated on May 17, 2017 by Sal Ferrarello

This WordPress plugin allows you to modify the comment parent for a given comment.

Why Would One Need This?

Sometimes when replying to a comment, I fail to reply and instead create a new comment. This prevents the comment thread from displaying properly. In the past, I’ve fixed this directly in the database. This plugin, allows me to fix it from the backend comment edit screen.

An Example of Needing to Change the Comment Parent

When commenting in response to another comment without using reply, which comment you are replying to can be ambiguous.

Screenshot of three comments where it is ambiguous which comment is being responded to.

In this conversation it is ambiguous whether Chewbacca’s reply is to Jabba the Hut’s question about the distance to Taco Bell or Han Solo’s question about the time completing the Kessel Run. We know that a parsec is a unit of distance, not time, so Chewie is responding to Jabba. Had Chewie used reply when posting his comment, this would have been clearer and Han would never have bragged in A New Hope,

It’s the ship that made the Kessel Run in less than twelve parsecs.

Using this plugin, we can go back to the comment and set the Chewie’s comment parent ID to be Jabba’s comment making the conversation unambiguous.

Three comments that are threaded making it unambiguous about which one is being responded to

Screenshot of the New Comment Parent Field

Screenshot of Edit Comment Screen with the new Parent Comment Field Added by this Plugin

Other Options

There are other plugins with similar functionality, however they either worked differently than I prefer or included additional functionality. One of these other plugins may meet your needs better.

  • Change Comment Parent allows you to modify the parent comment by clicking on the comments on the front-end.
  • Yoast Comment Hacks includes many different pieces of comment related functionality, this is one of them.

Available at WordPress.org

Modify Comment Parent Plugin

Image Credit

Pixabay

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit

Filed Under: Programming Tagged With: comments, WordPress Plugin

Reader Interactions

Comments

  1. Tran Gia says

    May 10, 2018 at 5:20 am

    Thank! Great article

    Reply
  2. Salim Al-Wahabi says

    September 17, 2020 at 9:07 am

    Sal,
    This is a great and simple plugin. Is this plugin compatible with 5.5.1? It does now show as such in the plugin page.
    Also,
    did you ever consider turning the ID field into a dropdown showing details of all comments on that post/page? While this way is flexible, it is not very intuitive.
    Thanks

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in