Today I was doing some research on wordpress comments. I am looking for making a Comment Type which I can use as a review on wordpress custom post type which I use for business directory listings.

Looking at the wp_comments table of wordpress Here is the table fields. Please fill me up for the purpose of each table field (looks at 10, 12, 13):

  1. comment_ID: ID for the comment
  2. comment_post_ID: The post for which the comment is posted
  3. comment_author: Comment author name
  4. comment_author_email: Author name for the comment
  5. comment_author_url: Author url
  6. comment_author_IP: Author IP address
  7. comment_date: Comment Date
  8. comment_date_gmt: GMT time of the comment
  9. comment_content: Contents of the comment (comment body)
  10. comment_karma: What is this? Does wordpress have any default karma calculation? or its placed for plugin authors
  11. comment_approved: Flag for the comment status.
  12. comment_agent: Not sure what it is?
  13. comment_type: What is it? Can wordpress have a default comment_type functionality like custom post type?
  14. comment_parent: For threaded comment
  15. user_id: user id if comment author is a registered user of the site.

I was wondering if i can use wordpress comment table and comment meta table to make the total review system working. The reviewer have to be registered before send review. So that will save lots of work. Also i need to know how the wordpress current comment functions will work with this method. As every comments has its own post id so it think that will not be a problem.

And also when I import the CPT I will also able to import all the comments and fields (if i add some comment meta fields) right?

So, if i sum up my questions are:

  1. what is 10, 12 and 13 db table field for comments? Does wordpress uses it or I can use it for saving extra information. And How do i use wordpress comment meta table. Any codex page link will be greatly appreciated.
  2. when I import the CPT I will also able to import all the comments and fields (if i add some comment meta fields)?

1 Answer 1


Karma is a relic. Unused.

Agent is the browser agent of the person who left the comment. Like saying they use firefox or IE or whatever.

Comment type is either "comment" (or blank for the default case) or "pingback" or "trackback", basically. You can have custom types, however they generally won't show up as comments because WP doesn't know about those types. Adding custom types is possible, but not officially supported yet because the code to support it properly isn't there.

You'd be much better off storing your type in comment meta for now.

  • Thanks! I also want to save fields like user the number of reviews user have given (count of comments in a particular CPT). Any comment in that? My guess it I have to make a user meta field for that. Also what do you think about my second question above?
    – Sisir
    Commented Sep 2, 2011 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.