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
1answer
20 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 ...
0
votes
1answer
17 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
0answers
16 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 ...
0
votes
0answers
66 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 /** コメント一覧表示部分のコード(...
0
votes
0answers
29 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 ...
0
votes
0answers
16 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? ...
0
votes
0answers
25 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 :)
1
vote
0answers
36 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 ...
0
votes
1answer
87 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 ...
0
votes
1answer
23 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' => '...
0
votes
0answers
29 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 ...
0
votes
1answer
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 ...
1
vote
1answer
31 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" ...
0
votes
0answers
10 views

Comments : Having the choice to login or not

So you have these two options in the Admin/Settings/Discussion : The problem: the second checkbox takes over the first one. How can can i leave the choice to either login -or- fill in name/email ? ...
0
votes
1answer
44 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 ...
0
votes
0answers
34 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 ...
0
votes
1answer
187 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/ ...
0
votes
1answer
55 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( '...
0
votes
1answer
34 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 ...
0
votes
1answer
18 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 ...
0
votes
0answers
19 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 ...
0
votes
1answer
121 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 ...
0
votes
1answer
78 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 ...
0
votes
0answers
124 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
0
votes
1answer
59 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'] ) >...
0
votes
1answer
429 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 ...
0
votes
1answer
158 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 ...
1
vote
1answer
681 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 ...
1
vote
1answer
38 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 ...
2
votes
2answers
441 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. // ...
0
votes
0answers
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 [...
0
votes
1answer
218 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 ...
0
votes
1answer
76 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 ...
1
vote
0answers
48 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 ...
0
votes
2answers
56 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 ...
0
votes
0answers
93 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 ...
0
votes
1answer
542 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(...
0
votes
1answer
22 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?
0
votes
1answer
1k 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 ...
0
votes
0answers
29 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 ) { ...
0
votes
1answer
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 ...
1
vote
0answers
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 ...
2
votes
1answer
629 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 ...
0
votes
0answers
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 ...
2
votes
1answer
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( $...
1
vote
1answer
1k views

Global $post not working in OOP function WordPress

I added a custom field with comment form. Below is my code.First function return post id when using var_dump function.But the last function return NULL always. class Post_Rating_Public_Helper { ...
0
votes
0answers
833 views

How do I make comment-reply-button with <span> that takes to comment reply form on click

I do need your help. I'm actually designing my personal blog's theme and I got stuck when I could not code a working comment-reply-button with span element. I know you must be wondering why with a ...
0
votes
1answer
119 views

Author name length character limit?

In comments, I want to limit author names. For example, the author's name should be no more than 10 characters. I'm looking for a way to do this. Thank you very much in advance.
0
votes
1answer
134 views

Check if comment author has url

I wanted to add target=_blank to comment author link and also wanted to add redirection link to url. So here is what I did: <a href="site.com/go?url=<?php echo get_comment_author_url(); ?>" ...
2
votes
1answer
3k views

How to add consent checkbox in comment section

To fulfil the GDPR policy, I want to add a consent checkbox under the "Post Comment" section. I have followed the WpBeginner tutorial and put the following code in my Comment.php file // Now we will ...

1
2 3 4 5 6