Questions tagged [comment-meta]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Best method for comment section associated with different images?

I would like to create a site where users can upload images and then all users can make comments associated with this image. Because users can upload multiple images I cannot make a new wordpress page ...
jdbrown444's user avatar
0 votes
0 answers
18 views

Add functionality to block comment authors in the Comment edit pag

I want to add an additional button to the Comments edit admin page, allowing me to ban the ips or emails in one click. After clicking the button, it should probably lead me to the Comment Moderation ...
karmeljuk's user avatar
0 votes
0 answers
16 views

How to update_comment_meta from checkbox in comments_custom_column?

I've added a custom column to the edit-comments.php page called "Tips". This column includes a checkbox. My question is when you click on the checkbox, how do you trigger the "...
Brian Smith's user avatar
0 votes
1 answer
30 views

Showing Counts on Comment List with Custom Query

I have added a meta value to the comments-meta table that adds a custom 'status' type code (called 'redacted') to a comment. I have used the following code to display a link to display only those ...
Rick Hellewell's user avatar
0 votes
1 answer
64 views

How do I add <div> tags to entire comments, not just their text

Thanks to some wonderful help here at stack exchange, I have built a comment section with a dropdown menu that adds comment_meta to the comments. I currently have a working filter that uses GET to ...
DJZEEGLER's user avatar
  • 119
0 votes
1 answer
215 views

How to filter comments by comment_meta

EDIT: Yay, solved it! I needed to use new WP_Comment_Query( $args ) and set my $args to only include the current post and the meta chosen. Thanks! Thanks to the wonderful help of the community here, I ...
DJZEEGLER's user avatar
  • 119
0 votes
1 answer
34 views

comments_where Hook

Is there a similar replacement of the hook posts_where for comments (WP_Comment_Query)? I need to modify the where clause for a comments query like it is shown in this tutorial (“4. Sub custom field ...
Silas_229's user avatar
0 votes
1 answer
152 views

How to check if `comment_meta` exists before inserting the comment?

I am inserting comments via wp_insert_comment and while doing so I am adding email replies only. Now, I want to check if the comment is already present or not before inserting and if does exist do not ...
Rohit kc's user avatar
0 votes
1 answer
29 views

Name of comment field differs on different sites

I have a question regarding the „name“ of the comment field of wordpress blogs. I have 2 sites, that are just available locally on my LAN. On the first site, if I inspect the comment field in firefox, ...
mathse's user avatar
  • 11
0 votes
1 answer
154 views

How is the author's name given a different color?

Author's and visitors' names use the same color in comments.The point here is that the color of the author's name is different in the comments. For example, in visitor comments, name is red. But, the ...
A. Muller's user avatar
0 votes
1 answer
28 views

Make every comment go to the spam folder

Wordpress comments exists in 4 states: 0 not approved 1 approved Trashed Spam When a user makes a comment it will end up in the 0 not approved folder, or if it's a spam comment directly to the spam ...
Benjamin's user avatar
  • 155
0 votes
1 answer
122 views

Use country flag as user avatar based on comments IP address?

trying to find the way to allocate a country flags instead using MisteryMan icon, Gravatar or User Avatar. Any help or suggestion about where to start?
SuperAtic's user avatar
  • 149
0 votes
1 answer
71 views

How to put this result inside that result?

I want my comment results to put inside anoher result. I want this result $args = array( 'post_id' =>$post->ID, 'status' => 'approve', ...
Bikram's user avatar
  • 338
0 votes
1 answer
101 views

Top rated posts Average rating issue

I am trying to show top rated posts, cpt with AVG rating value.I created the custom widget for this. Defaults wp posts data and AVG value is showing correct but a CPT like Movie post not showing ...
Shoaib Saleem's user avatar
0 votes
1 answer
2k views

How to get top rated posts using wp query?

I want to get top rated posts using wp query. The rating value is store in comment meta database table when some one post a comment on wp post or cpt.Please screenshot EDIT Here is my code ...
Shoaib Saleem's user avatar
0 votes
1 answer
3k views

How to add/update post meta to use in query?

I found a rating system that users can rate the post when commenting. Every thing is good but I want to use the average rating of posts to sort them to users based on average rating (in fact be able ...
sh.dehnavi's user avatar
0 votes
1 answer
113 views

Adding Comment Meta to a new comment notification email

I am trying to include a rating comment meta value in the subject line of the email that notifies authors that someone has left a new comment (and, in my case, a rating) on their post. function ...
user2093979's user avatar
0 votes
2 answers
430 views

How to display comment meta under each comment content

I'm trying to display comment meta under each comment, but I couldn't find which action should I hook in.
Kimsea Sok's user avatar
2 votes
1 answer
212 views

How would I count the number of times a comment meta field's value is in a post's entire comments?

How would I count (and display) the number of times a comment meta field's value is a post's entire comments? e.g. meta key is "fish" and key value "shark" appears in 5 comments of a post.
Pete's user avatar
  • 998
3 votes
1 answer
2k views

change the comment time output to: X time ago instead of actual date and time

<?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?> Above is the default code that exists for comments.php in the WP Core. This will produce an Output like this: ...
WordCent's user avatar
  • 1,827
0 votes
1 answer
91 views

Removing(replacing) avtar in comments.php with some other HTML arrangements

<ol class="comment-list"> <?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, ...
WordCent's user avatar
  • 1,827
0 votes
1 answer
294 views

Check if the current user is author of first comment

I am editing the comments.php file for the purpose of my site. I want the comment section to be something like this: only the person who made the first comment and the post author will be able to ...
shafee ul kabir Fahim's user avatar
0 votes
1 answer
157 views

Conditional tag for comments

How can I check if the current loop is a comment? Something like is_comment(). I'm building a custom update_x_meta() function where we update meta data according to the type, example: if ( is_single(...
Christine Cooper's user avatar
  • 8,748
0 votes
1 answer
240 views

Update comment meta for all comments of specific post

Questions says it pretty much ... Is it possible to change the comment meta for all comments of a specific post? I know it probably works like this: $comments = get_comments( array( 'post_id' =&...
GDY's user avatar
  • 408
0 votes
1 answer
388 views

Display comment meta data after quick update

I have few custom comment field - phone, stored as comment meta. On comments edit page (edit-comments.php) I display this value in custom column. I also display these values on post edit page (post....
anton's user avatar
  • 1,033
1 vote
1 answer
198 views

How can I get values count from wp_commentmeta?

I am using ACF Plugin in my wordpress site, and I have added radio buttons in comment form, like reactions. it's saving results in wp_commentmeta like this; it's working very good but I want to ...
Ayd In's user avatar
  • 13
0 votes
1 answer
39 views

Wordpress Commenting System User access and Security

In General, WordPress gives these 5 access types to user → Click Here. Namely, Subscriber Contributor Author Editor Administrator I have a main website to be launched here, and then the blog here. ...
WordCent's user avatar
  • 1,827
0 votes
1 answer
1k views

How to get Post title by locale with Qtranslate-X

I need to send 2 emails, when new comment is posted and when new comment is approved. Site is multilingual and uses qtranslate-x plugin. Here is code, which sends email when comment is posted. In ...
anton's user avatar
  • 1,033
-4 votes
1 answer
67 views

how to Show BEFORE TEXT before in wordpress get_comment_meta [closed]

I am using a piece of code to show the city output. It is working fine. The code is given here: $city = get_comment_meta( get_comment_ID(), 'city', true ); I want to show Re: text before the output ...
PARVINDER's user avatar
1 vote
1 answer
99 views

How to customize Wordpress twentytwelve_comment function

Is there any way to customize wordpress twentytwelve_comment function to change default comment author meta details.
PARVINDER's user avatar
0 votes
1 answer
697 views

Custom comment action

I have updated my Wordpress version from 4.3.1 to 4.5.2 and apparently it broke a custom function I've made in the past. What it does: Display a anchor below comments, next to Approve/Answer/Edit/...
AlexG's user avatar
  • 153
1 vote
1 answer
943 views

Filter out comments with certain meta key/s in the admin backend

Not long ago I learned how to add and filter comments on posts/pages with certain meta key/value and it works fine now. Now what I want is to do two things on the backend (/wp-admin): Filter the /wp-...
58YtQ2H83m17838963l61BU07Y8622's user avatar
0 votes
1 answer
202 views

Add commentmeta custom field to every published comment with SQL

I am trying to add custom commentmeta "likes" with 0 as default value to every posted comment. I have this query but I dont see any error there, but still it doesnt work. Can anyone help me to solve ...
Martin's user avatar
  • 1
0 votes
1 answer
277 views

Use has_filter on comment_post

I hook to comment form (on comment_form_logged_in_after if user is logged in and comment_form_before_fields if not) to add 2 fields (rating and title). These fields can be mandatory or comment will ...
Dudo1985's user avatar
  • 113
0 votes
1 answer
129 views

How does WP decide how to display a page

I am new to WP. I tried reading up as much as I possibly can online, and via browsing through the files. As far as I can tell, no physical pages/links are stored on the disk, so when a page is created,...
EastsideDev's user avatar
0 votes
2 answers
437 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 ...
730wavy's user avatar
  • 193
0 votes
1 answer
2k 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 ...
Shahrukh Khan's user avatar
0 votes
1 answer
2k 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 ...
Thierry's user avatar
  • 11
2 votes
1 answer
926 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 ...
tonykhan's user avatar
0 votes
1 answer
581 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 ...
Alex's user avatar
  • 131
0 votes
0 answers
1k 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 /***********************...
Cédric Charles's user avatar
0 votes
2 answers
347 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 ...
inTOWN's user avatar
  • 101
7 votes
2 answers
10k 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 ...
Enrique Moreno Tent's user avatar
0 votes
0 answers
351 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 ...
mathiregister's user avatar
0 votes
1 answer
474 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 ...
whiteletters in blankpapers's user avatar
1 vote
2 answers
2k 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 .' ...
whiteletters in blankpapers's user avatar
0 votes
5 answers
5k 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 );
Haymanpl's user avatar
2 votes
1 answer
3k 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 ...
Daniel Foltynek's user avatar
0 votes
1 answer
3k 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 of ...
jjj's user avatar
  • 119
4 votes
1 answer
579 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 ...
mathiregister's user avatar