WordPress.org

Ready to get started?Download WordPress

Forums

Handling comment meta with a syntax (1 post)

  1. fejanos
    Member
    Posted 2 years ago #

    Hi everyone Can anyone help me create this?

    In my theme I added a custom field into the comment form. In this custom field the user submits a label (a string) for the post (single post) as a comment meta. This user submitted label will be added to wp_commentmeta table et_comment_label as meta_key and the meta_value would be the label (string) submitted by the user. The label (string) that is submitted by most of the users (through the comment form) will be displayed on the post (single post) next to the post content. I need a syntax that counts which is the label that is most frequently submitted. For example:
    user 1 submits label: 'awesome'
    user 2 submits label: 'worthless'
    user 3 submits label: 'awesome'
    user 4 submits label: 'boring'
    user 5 submits label: 'awesome'
    As the label 'awesome' appears 3 times so that label appears next to the post content.
    Anyone can help me to create this syntax?

Topic Closed

This topic has been closed to new replies.

About this Topic