Questions tagged [comment-meta]
The comment-meta tag has no usage guidance.
68
questions
0
votes
3
answers
2k
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 ...
0
votes
0
answers
32
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 ...
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 );
0
votes
0
answers
19
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 ...
0
votes
0
answers
18
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 "...
0
votes
1
answer
31
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 ...
0
votes
1
answer
81
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 ...
0
votes
1
answer
245
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 ...
0
votes
1
answer
37
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 ...
0
votes
1
answer
165
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 ...
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, ...
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 ...
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 ...
0
votes
1
answer
168
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 ...
0
votes
1
answer
123
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?
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',
...
0
votes
2
answers
444
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.
0
votes
1
answer
102
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 ...
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 ...
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
...
2
votes
1
answer
3k
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.
I'...
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 ...
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 ...
0
votes
1
answer
115
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 ...
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
/***********************...
2
votes
1
answer
215
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.
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:
...
0
votes
1
answer
92
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,
...
0
votes
1
answer
298
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 ...
0
votes
1
answer
159
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(...
0
votes
1
answer
244
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' =&...
1
vote
2
answers
19k
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?
3
votes
1
answer
8k
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 ...
0
votes
1
answer
394
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....
1
vote
1
answer
200
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 ...
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.
...
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 ...
-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 ...
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.
0
votes
1
answer
703
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/...
1
vote
1
answer
952
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-...
0
votes
1
answer
205
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 ...
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 ...
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,...
0
votes
2
answers
443
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 ...
2
votes
2
answers
2k
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 ...
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 ...
2
votes
5
answers
3k
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
1
answer
934
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
1
answer
588
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 ...