The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
11 views

Echo out custom fields in comments

I am trying to figure out how to echo 4 created fields from a plugin in my theme template for the comment form and customize the comments output as well. The plugin I am using lets me add custom ...
0
votes
1answer
35 views

How can I edit comment meta value before it is saved?

I have introduced a custom field in comments form using add_comment_meta() function. I would like to know if there is a way to edit the data of the comment meta just before the post data is saved so ...
0
votes
0answers
6 views

How to use custom_query_var along with post_id for comments

I have introduced a custom_query_variable - brand in my permalink using the below function. function add_query_vars_filter( $vars ){ $vars[] = "brand"; return $vars; } add_filter( 'query_vars', ...
0
votes
0answers
11 views

How to display comments grouped by commentmeta?

I have added a "category" to my comment-form which allow the user to specify the type of comment he is entering (dropdown list with three values: experience, reference, criticism) and a title that ...
0
votes
1answer
14 views

How to add a category to comments?

I am currently trying to add a category to the comments on my wordpress site. I already added a title to these and tried several ways to add a dropdown (selection) list to the comment form but I am ...
0
votes
0answers
15 views

Querying sanatized data with meta_query in Wordpress

I asked this question over at SO yesterday, but I see now that this is the right place for it to live. After Googeling this for a while, I've found that this should work cite, but I don't seem to get ...
0
votes
0answers
8 views

Return multiple comment_meta keys

I've this code $args = array( 'post_id' => $post_id, 'meta_query' => array( 'relation' => 'AND', ...
2
votes
1answer
89 views

Wpdb query for comment meta for current post

I have a comment meta field that displays a rating for each comment, I was wondering if there is any way I can query the database to get the sum total of these ratings for each post. I have included ...
0
votes
1answer
70 views

get_comment_meta not behaving as expected

I'm sure this must be a silly error by me but I haven't been able to solve it... I added an extra 'rating' field to my comments form so that users can rate posts. Everything works fine and by using ...
0
votes
0answers
39 views

Customize the “respond” div on comments

I wanna ask if is possible to make my custom comments template, just for a reason: in /wp-includes/comment-template.php, there is a <small> wrapping the following code: <?php ...
0
votes
0answers
295 views

Add comment meta

I need to add my custom meta to the new comments. Here is what I've done : /************************************************************************/ /* Add meta to comments ...
0
votes
2answers
85 views

Retrieve meta_value from add_comment_meta

I have a voting function for comments which needs to display the avatars of the users who voted for a specific comment. I am having trouble getting the user id of the voter ($supporter). All I seem to ...
5
votes
2answers
1k views

What for is the table “wp_commentmeta” exactly?

I have been reading about the Database Description of Wordpress. I haven't understood the meaning to the use of the table wp_commentmeta. The documentation says: Each comment features information ...
0
votes
0answers
224 views

Comment-Meta doesn't work with latest wordpress update

I already had this script working, but since the last update of the wordpress core it doesn't save the comment-meta anymore. /** * Comments Winner */ // Add new heading to comments tables ...
0
votes
1answer
137 views

An action hook where a comment meta is updated

By analogy to the hook on post meta update, I use the following code for hooking when comment meta value is updated. My comment meta key is "consider" and can have 2 values: 0 and 1. My Goal is to ...
1
vote
2answers
218 views

count number of user comments with a specific comment meta value

I am using the code below to count the number of comments by a certain user: global $wpdb; $count = $wpdb->get_var( 'SELECT COUNT( comment_id ) FROM '. $wpdb->comments .' ...
0
votes
2answers
276 views

How Do I Remove Comment Date and/or Comment Date Link

Found this code in the WP Codex but not sure how to use it to remove the hyperlink and/or date from comments. delete_comment_meta( $comment_id, $meta_key, $meta_value );
2
votes
1answer
1k views

Add a drop down list to comment form?

Can somebody help me to create a drop-down menu or (radio buttons) in Wordpress comment form, so that a new user could make a selection of their user roles (for example teachers + students) ? Output ...
0
votes
1answer
578 views

How to get a value from comment meta

I've add the field country in the comment form. Working nice and I can see the value in the table commentmeta. Now I try to display this value in my comment list. In my single.php I call the list ...
4
votes
1answer
348 views

Adding another state (spam, reject, approve) to wordpress comments?

i know this might sound a bit weird, but what I'm trying to do is rather simple in mind but may be technically difficult. I'm running small contests on my wordpress site where I ask users to leave a ...
1
vote
1answer
104 views

Storing Comment Meta as an Array

I need to add multiple checkboxes to a post comment form (a Woocommerce product review form, to be exact) that allows people to choose which health condition the product is best for. Upon choosing X ...
5
votes
2answers
377 views

Lack of composite indexes for meta tables

Why wp_commentmeta table does not have a composite index (comment_id, meta_key) by default? I believe it's the only useful index for that table, am I wrong? Instead, it has a strange set of indexes: ...
0
votes
1answer
2k views

Is it possible to show custom comment metadata in the admin panel?

I've customized my comment form with a new field (city, but that doesn't really matter). I've hooked and filtered and added my comment metadata with add_comment_metadata. I want to show that metadata ...
1
vote
1answer
855 views

Upload images with comment

EDIT: I finally got the right answer; see my own answer beneath this post for everyone that's interested. After searching for a couple of days and trying over and over again I really got stuck. ...
0
votes
1answer
44 views

add field comment [duplicate]

Possible Duplicate: Add Comment Custom Field Add Comment Custom Field I'm also interested with this, but where should I put those codes? help me guys..
1
vote
2answers
4k views

Add Comment Custom Field

I searched a lot of thread regarding my problem, but unfortunately I found nothing works, and this my final option. I want to add some custom fields on my comment form. How can I do that?
0
votes
1answer
136 views

Editing custom fields for comments

I need help with why the save function is not working in the edit_comment hook. Here is the code for the 'comment_post' hook: add_action( 'comment_post', 'save_comment_meta_data' ); function ...
1
vote
1answer
313 views

How to update Post Meta values through the comment system

I'm working on allowing users to rate posts - through the comment meta. Storing and displaying individual ratings is working, however, I would like to be able to store the average rating in the post ...
3
votes
2answers
798 views

Running a function on comment status change

I am making a review system where i need to find update rating average when: A comment gets approved from pending/trash/spam. A comment gets upapprove from approve A admin post reviews (auto ...
1
vote
1answer
217 views

Get comments from post and sort by commentmeta value

I want to get all of the comments for a given post and return them in order by a meta_key's value desc high to low. Doesnt look like i can do this with get_comments() like i would like to. This will ...
2
votes
1answer
1k views

Query & Sort Comments by custom comment meta

I added a basic "favorite/recommend" functionality for posts and comments to a wordpress site I'm working on. I'm storing the total numbers of comment "likes" in a custom comment meta field ...
0
votes
1answer
599 views

How to sort posts by the average of comment meta values

Here's the situation- I've customized the comment submission whereby users can provide a rating, and this gets stored as a meta value in the commentmeta table. I can query to return the average ...
1
vote
1answer
736 views

Wordpress Comment. Need some details of wp_comments DB table

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. ...
10
votes
1answer
546 views

Find out which moderator approved comment?

Is there any way to find out what moderators have approved a comment, and then display that information on the front-end? e.g. John says: "This is a great article" - Approved by Admin1
2
votes
5answers
816 views

How to get the average of the values from the comment meta

I used the comment meta to add a simple rating system. The user can post a rate from the comment form from where I added 3 dropdown comment meta. The rating is working well, reflecting the ratings ...
2
votes
1answer
1k views

How to change title attribute returned by comments_popup_link()?

I can change label of comments by altering Comment(s) from parameter of following function: comments_popup_link('No Comments;', '1 Comment;', '% Comments;'); But, seems that title attribute is ...
1
vote
1answer
174 views

show the meta values to visitors that collected via coment form

in stackoverflow (here) there is a solution for collecting extra information from visitors, and i want to ask that, is it possible to show the collected information to other visitors in his/her ...
0
votes
2answers
897 views

What are the additional fields in wp_comments used for?

I'm working on a rather odd implementation that stretches the limits of WP a little - its a healthcare site where patients are a custom post type and procedure requests related to each patient are ...