Skip to main content

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
1 vote
1 answer
60 views

Nofollow the date/time hyperlink in comment

Where the date and time of sending each comment is displayed in the comments, it is also a hyperlink. I want to nofollow this a tag. I was able to do this through this file in this path: wp-includes/...
Monoor's user avatar
  • 13
0 votes
2 answers
433 views

How to remove website url field from comment form completely?

I have this in my functions.php /*Remove website field from comment*/ function xyzmark_remove_url($fields) { if(isset($fields['url'])){ unset($fields['url']); } return $fields; } add_filter('...
sanjay ojha's user avatar
0 votes
1 answer
48 views

Prefill the textarea in comment_form

I would like to put a prewritten comment in the WordPress comment section by modifying comments.php: <?php if ( comments_open() ) { comment_form(array( 'title_reply'=>'', 'label_submit' => ...
joxyzan's user avatar
  • 13
1 vote
1 answer
129 views

Make comment textarea input un-required

Goal: I need to hide/disable the text-area comment field, and only display author field. I've succeeded in doing this with the code below. Problem: Text-area comment input is hidden, but is still ...
Unloving1507's user avatar
0 votes
1 answer
27 views

Wanted to get rid of Paragrapgh tag in submit buttom of the WordPress form

function modify_comment_form_fields($fields){ // Check if $fields is an array if (!is_array($fields)) { return $fields; } ob_start(); $submit_button = ob_get_clean(); $submit_button ...
WordCent's user avatar
  • 1,877
1 vote
0 answers
110 views

Error 403 when posting comments to a custom post type from a different page

Im trying to make a simple ticket support system by using custom post type, comments and a page. So it works like this, User creates a ticket with details and it's inserted into the custom post type &...
CruzZ's user avatar
  • 11
0 votes
1 answer
50 views

Replace Entire Comment Box with Text

I have a need to disable comments for a specific group of users. But I want to replace the entire comment box with a message like "Sorry, you are not allowed to enter a comment". Other users ...
Rick Hellewell's user avatar
0 votes
1 answer
1k views

How to hide and disable URL and email fields from comments?

How can I hide and completely disable (in case of bots) the URL and email fields in comments? There are a few free plugins that seem to do this, but most of them only hide the URL field and not the ...
Jesse Nickles's user avatar
0 votes
1 answer
366 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
-1 votes
1 answer
296 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" ...
Nicolas Gimelli's user avatar
0 votes
1 answer
58 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 ...
DJZEEGLER's user avatar
  • 119
0 votes
1 answer
88 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 ...
JamesTheAwesomeDude's user avatar
1 vote
1 answer
362 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 ...
Teymur Abbasov's user avatar
0 votes
1 answer
162 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 ...
Marcus Wood's user avatar
0 votes
1 answer
40 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
0 answers
3k 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 /** コメント一覧表示部分のコード(...
kaz Oh's user avatar
  • 1
0 votes
0 answers
32 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? ...
Patrique Uiliam's user avatar
1 vote
0 answers
207 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 ...
Konrad's user avatar
  • 11
0 votes
1 answer
718 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 ...
SCYankee's user avatar
0 votes
1 answer
122 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' => '...
Honoluluman's user avatar
0 votes
0 answers
31 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 ...
Roah's user avatar
  • 1
0 votes
1 answer
47 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 ...
Patrique Uiliam's user avatar
1 vote
1 answer
50 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" ...
Matthew Brown aka Lord Matt's user avatar
0 votes
1 answer
76 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 ...
Aleksandar's user avatar
0 votes
0 answers
48 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 ...
stemon's user avatar
  • 155
0 votes
1 answer
900 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/ ...
cloyd concepcion's user avatar
0 votes
1 answer
205 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( '...
dragoweb's user avatar
  • 249
0 votes
1 answer
42 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 ...
Dimitrios Pavlis's user avatar
0 votes
1 answer
66 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 ...
Fletch Armstrong's user avatar
0 votes
0 answers
23 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 ...
AHrtzt's user avatar
  • 13
0 votes
1 answer
401 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 ...
Divyang's user avatar
  • 13
0 votes
1 answer
323 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 ...
Gidromasservis QSC's user avatar
0 votes
0 answers
253 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
Mohammadreza Afzali's user avatar
0 votes
1 answer
124 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'] ) >...
klvb's user avatar
  • 21
0 votes
1 answer
947 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 ...
wpdd's user avatar
  • 313
0 votes
1 answer
537 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 ...
Chillin''s user avatar
  • 101
1 vote
1 answer
1k 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 ...
Naser.Sadeghi's user avatar
1 vote
1 answer
58 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 ...
Aslan's user avatar
  • 55
2 votes
2 answers
792 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. // ...
Bikram's user avatar
  • 338
0 votes
0 answers
47 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 [...
Manthan Kanani's user avatar
0 votes
1 answer
527 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 ...
fatihturan's user avatar
0 votes
1 answer
108 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
1 vote
0 answers
148 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 ...
marvin castro's user avatar
0 votes
2 answers
202 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 ...
Shamsher Ali's user avatar
0 votes
0 answers
200 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 ...
Serdar Koçak's user avatar
0 votes
1 answer
911 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
27 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?
Matthew Brown aka Lord Matt'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
0 answers
44 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 ) { ...
Mark71's 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 ...
A. Muller's user avatar

1
2 3 4 5 6