Extending the database

I’m not sure why you’re getting a 1. Your code says that you should not. However, it seems that what you’re doing is unnecessary and generally ill-advised. Modifying existing tables is usually not needed.

The wp_comments table contains a comment_parent and user_id column.

So if I reply to a comment, it’s immediate parent ID is in comment_parent and that comments author ID is in user_id if they are logged in (0 otherwise).

You could also use the wp_commentmeta to store this information if I’ve misunderstood.

Leave a Comment