Questions tagged [comment-form]

This tag outputs a complete commenting form for use within a template. Most strings and form fields may be controlled through the $args array passed into the function, while you may also choose to use the comment_form_default_fields filter to modify the array of default fields if you'd just like to add a new one or remove a single field.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 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 ...
user avatar
-1 votes
1 answer
44 views

Clicking Comment "Reply" Button only replies to first comment

I'm editing my comments.php, and within it I've added a reply button like this: <div class="reply"> <a rel="nofollow" class="comment-reply-link" ...
user avatar
0 votes
1 answer
31 views

How to create a classified section in place of comments_template

I am running a site where users can find great information about musical artists and their releases. Each release is a wordpress post. Each artist is a wordpress post. In my single-artist.php and my ...
user avatar
0 votes
0 answers
18 views

Wordpress comment processing . Default unapproved comments detection before posting

I am working on wordpress comment section. I understand that when we are posting some comments for example comments with many links, then WordPress storing this comment in to the database with ...
user avatar
  • 25
0 votes
1 answer
13 views

How to change Akismet commenter privacy notice?

I read the supposed explanation posted on their blog, and came away unenlightened. The following site-specific plugin does nothing (I have enabled it): <?php /* Plugin Name: Akismet Better Privacy ...
user avatar
0 votes
1 answer
51 views

How to make comments private for commentor and post author

I am trying to make comments private. I mean comment must be visible for post author and comment author. I create custom comment section "better-comment.php". I have used pre_get_comments ...
user avatar
0 votes
1 answer
42 views

Changing the Comment Fields using Filter (without success)

Am I doing this all wrong or should this be working? No matter what post I visit, it's thrown into an endless loop.. This is the code: add_filter('comment_form_fields', 'comment_form_args'); function ...
user avatar
0 votes
1 answer
18 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, ...
user avatar
  • 11
0 votes
0 answers
20 views

How to send add_comment_meta value from separate file to main plugin file?

I try to add meta key and meta value to comment using add_action 'comment_post' and add_comment_meta. It works only in main plugin file but not in template file. So my first question: is it possible ...
user avatar
  • 5
0 votes
0 answers
226 views

COMMENT FORM Error: Please type your comment text

Error: Please type your comment text. I Created COMMENT FORM but Error happened which is above. I dont know hot to fix this Anyone help me please Thank you very much! Function.php /** コメント一覧表示部分のコード(...
user avatar
  • 1
0 votes
0 answers
62 views

Cannot Remove Title Reply from Custom Comment Template for Signup Page

Building a page template, I've managed to remove all the fields I do not need. All except for the title reply and "your email will not be published..." text. The general idea here is to use ...
user avatar
0 votes
0 answers
19 views

How do I make the comment disappear after deleting from the database?

I can delete the comment from the database with this code, however when the page is loaded again the comment will still be there. I need to update again to disappear. How do I resolve this? ...
user avatar
0 votes
0 answers
51 views

pin a comment to top of comments list

i want to pin all comments from post with commentmeta = 'spolie' on the top of my comment list in post. Quite similar to Instagram pin comment or wpdiscuz pin comment; Can someone help me. tnx :)
user avatar
1 vote
0 answers
87 views

Display complete comment section via post ID

what I want to achieve: I would like to display the complete comments (including answers and the comment form) of a certain Page ID in the middle of my home page (I use WPBakery Page Builder). These ...
user avatar
  • 11
0 votes
1 answer
182 views

Modify "Must be logged in to comment" text/links?

My site requires users to login to comment. Unregistered and logged out users see "Must be logged in to comment. You may also register for an account." How do I change this text and the ...
user avatar
0 votes
1 answer
50 views

Use of comment_reply_link_args filter

i am trying to create a filter like this add_filter('comment_reply_link_args','change_author_title'); function change_author_title( $args ) { $defaults = array( 'add_below' => '...
user avatar
0 votes
0 answers
30 views

comment just attachment .. reply just text ... can I do that?

I want comments just to upload videos without text but replies the opposite I mean comments just to upload videos.. without text area ... in replies its a must to write in text area without any ...
user avatar
  • 1
0 votes
1 answer
29 views

How to put the author of the post in the comments?

I need to put the name of the author who wrote the post and I can't find the solution. EXAMPLE: Rachel [06/03/21] : Commented in the post "How to be a Web Designer", written by: POSTAGE ...
user avatar
1 vote
1 answer
36 views

How do I target a single page to modify the comment form of only that page?

If I want to globally change the comment form for a theme I would use add_filter for "comment_form_default_fields". Then I might use add_action for "comment_form_logged_in_after" ...
user avatar
0 votes
1 answer
46 views

Custom sort comments with select form

I use ACF Pro to create a customized comments section with additional fields to my custom post type called Products (it's a simple page with a custom comment section, NOT using WooCommerce). Now ...
user avatar
0 votes
0 answers
38 views

Edit Comments Fields

I need to edit the comments fields. 1 - The metadata should be only date; 2 - The comment itself should be trimmed; 3 - the word 'says' next to the name should be gone; I believe I can manage the ...
user avatar
  • 145
0 votes
1 answer
375 views

Display the list of user's comments + the post title + date

I am trying to display the current user's ALL comments in a specific page and I'm using this code (uses a shortcode): https://blog.ashfame.com/2011/01/show-recent-comments-particular-user-wordpress/ ...
user avatar
0 votes
1 answer
77 views

Replace text by icon in TinyMCE toolbar

I added TinyMCE in the post comment textarea by adding this into my child theme function.php function rich_text_comment_form( $args ) { ob_start(); wp_editor( '', 'comment', array( '...
user avatar
  • 239
0 votes
1 answer
35 views

Comment Form Development Issue

I am new to wordpress theme development and I am trying to create a custom comment form. I read the documentation and I have a reach a point that I am happy with the layout but I have 2 issues with ...
user avatar
0 votes
1 answer
20 views

Same comment section on every page

I'm looking to basically have a unified comment section, so if a user posts on page a, it also shows on page b. I've searched online but have been unable to find any documentation on this and wondered ...
user avatar
0 votes
0 answers
20 views

Update post "A" on comment submition on post "B"

Hello and thanks in advance for any help. Im trying to update the post status from a post when submiting a comment on other post, I have a variable in the url pointing to the ID of the post I want to ...
user avatar
  • 13
0 votes
1 answer
172 views

Upload avatar for post comment

I have a comment form and any one can add comments without creating an account. Now client asking to allow user to upload profile picture from the comment form. Check attached image below. Any help ...
user avatar
  • 13
0 votes
1 answer
101 views

How to display replies to his comments in user profile of current user

How to display list of replies to his comments in user profile of current user. my website can send notification that example: "someone replied to your comment" and when i click the link ...
user avatar
0 votes
0 answers
171 views

reply comment below the comment box without reload page

I make a comment form before comment list and I want to show a comment form inside the comment box that chose to reply without refresh the page the website I inspired the idea Novin.com
user avatar
0 votes
1 answer
70 views

How to display comments length

i used this code for limit comment length add_filter( 'preprocess_comment', 'wpb_preprocess_comment' ); function wpb_preprocess_comment($comment) { if ( strlen( $comment['comment_content'] ) >...
user avatar
  • 21
0 votes
1 answer
540 views

Comment author profile image

I have a custom comment form and any one can add comments without creating an account. Now I want to set comment author image for each of the comment. I could not find any function or support for this ...
user avatar
  • 313
0 votes
1 answer
227 views

Is there a way to edit the markup of comment_form()?

I have a single.php page where I call the the_content() function, followed by the comment_form() function to display the comment box. While this function does display the logged in user, link to log ...
user avatar
  • 101
1 vote
1 answer
767 views

How to call my custom WordPress Comment form without getting the comments?

I just created a comments.php file inside my WordPress theme folder and I customized some fields. My main purpose was to use Bootstrap 4's input groups. When I call the comments using the code piece ...
user avatar
1 vote
1 answer
43 views

Translation Issue with Wordpress Theme Check in comment_form function

I ended my wordpress theme, which called the_mdttheme. I tried to check it and get two errors with translation in comment_form(). Can't understand what did wrong, can someone help me? Here is two ...
user avatar
  • 45
2 votes
2 answers
500 views

How to save new comment as custom comment type?

My previous plugin was saving the comments as type="wp_review_comment". I have handled the previous custom fields as below. But I'm having difficulty saving the comments as a custom comment type. // ...
user avatar
  • 198
0 votes
0 answers
45 views

How to find which last line executed in wordpress?

I got one of the sourcecode that having an issue with woocommerce comment. After wordpress comment it displays Array ( [rating] => 1 [comment] => Something happen [...
user avatar
0 votes
1 answer
261 views

Force to show all fields in comment forms to the logged-in users

I want to force to show all fields (if possible these can pre-filled with user own e-mail and name data) to the logged-in users. So I found a reply on Wordpress Development/SE Community but I don't ...
user avatar
0 votes
1 answer
85 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 ...
user avatar
1 vote
0 answers
81 views

Insert page comment form into a modal

Good day! How do I insert the comment form of a certain page into a modal? I have in my wordpress website the plugins Popup Maker and Buttonizer. Now I need the comment form to be inserted in the ...
user avatar
0 votes
2 answers
69 views

Hide review form if user has left a comment

I am trying to hide the comments form if a user has left a comment on that particular post, otherwise display the comment form. I added a code snippet to a hook which hides the form, but reverts to ...
user avatar
0 votes
0 answers
130 views

Comment Form Fields when user logged in

WordPress comments form automatically detects the name and email if you logged in. I want to disable this feature by adding a code snippet. The name and email fields should be filled by users and even ...
user avatar
0 votes
1 answer
642 views

how to load the comment template from a plugin

I want to create custom design for the comments. comments_template() will load the default \comments.php. i have a file inside my plugin commentsnew.php how can i use this file for comments_template(...
user avatar
0 votes
1 answer
24 views

How do I check which comment fields are required in my theme?

I plan to use comment_form() with a bunch of arguments to format the output. However, I need to know which fields have been set to required (to style them as such). How do I do that?
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 ...
user avatar
0 votes
0 answers
32 views

Store comment form custom field in custom database

I'm trying to add custom field created on comment form to custom database. But my solutions not working. How to change/improve it? I add custom fields this way: function add_interests( $fields ) { ...
user avatar
  • 3
0 votes
1 answer
2k views

How to Send Confirmation Emails to Users after Form Submission?

I would like to run a confirmation e-mail on Contact Form 7 What I want is: Once a form has been submitted, the visitor who sent the form must confirm it by going to the email address. A confirmation ...
user avatar
1 vote
0 answers
30 views

Add a default WP comment form to forum template

I've learned that it is possible to add a default comment to the custom post type: https://codex.wordpress.org/Plugin_API/Filter_Reference/comments_template However, what if in case of not custom ...
user avatar
  • 25
2 votes
1 answer
729 views

How to add a title field in comments?

Just like WP posts have title and text, I want to have titles to my comments. Now how do I add it and show them above the comment texts like a title. I need it to have a css name as well. The title ...
user avatar
  • 198
0 votes
0 answers
16 views

How is it possible to create Multi part sections where people can answer or comment or vote on various parts of a page's content as given example?

How is it possible to create Multi part sections where people can answer or comment on various parts of a page's content as given example? Using this as a reference example (can attach screenshot if ...
user avatar
  • 133
2 votes
1 answer
2k views

Remove "at" string from wordpress comment date

I'm using the following code to format the author's comment date and remove the time: function my_change_comment_date_format( $date, $date_format, $comment ) { return date( 'd M Y', strtotime( $...
user avatar
  • 123

1
2 3 4 5 6