Questions tagged [comments]

Comments allow your website's visitors to have a discussion with you and each other. When you activate comments on a Page or post, WordPress inserts several text boxes after your content where users can submit their comments.

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

How to add a custom field on WooCommerce reviews form?

i have 2 problems with my code. 1. i can see only the title in the comments. cant see the cons. 2. how do i make the con's part to have a title "cons" and then the text that the user wrote. as oppose ...
0
votes
2answers
22 views

Disallow Comments

My web host has suspended my website because the comment sections of pages were being spammed so I can no longer access the site via wordpress. What files do I need to edit to switch off comments on ...
0
votes
1answer
12 views

Comments change the template name

I am following this tutorial: https://www.wpthemedetector.com/create-archives-page/ How come when I type the following block of code in a file named page-archives.php, the template name changes? For ...
0
votes
1answer
21 views

Comment restrictions Wodpress

I want to restrict new registered users on my WordPress site from writing comments until 3 days passed their registration date. What solution do you recommend? thanks in advanced.
0
votes
1answer
21 views

Why are HTML tags limited in comment section?

I see that HTML tags are limited in comment section. Is there a reason for this? What could go wrong if more are allowed? For example, the table, heading, image and list tags. FYI: Expanding the ...
0
votes
2answers
18 views

Remove the URL author of post on all comments

I can't manage to disable the URL of only the author's post. Here's an example : My website As you can see, the green link is mine (the author of the post). I only want to remove that link, not other ...
0
votes
0answers
18 views

Using Disqus with headless Wordpress setup?

Does anyone have any experience using Disqus with a headless WP setup? I am working on converting a standard WordPress blog to a headless front end, with the users using the standard WP back end in ...
0
votes
0answers
16 views

How to delete comments from front end — in Multisite?

I have a custom plugin that allows users to delete their own comments from the front end (and allows editors to delete subscriber's comments too). It works fine on a single Wordpress installation, ...
0
votes
0answers
21 views

Hooking into user_has_cap to let authors modify their own comments in other users' posts

I'm trying to modify comment permissions to allow author role users to modify their own comments in posts authored by other users. This is not possible in by default as it requires the edit_posts ...
0
votes
0answers
17 views

Allow user to manage reviews but not products

I'm trying to create a role that grants access only to the comments section of the admin dashboard and allows the user to approve the reviews on the products without allowing them to edit the product ...
0
votes
0answers
23 views

How to change “1 Comment” headers?

I use a blog layout on my site. For example, when you make a comment, you get titles like 1 and 2 comments. For example, when you make a comment, you'll get headlines such as 1 and 2 comments on the ...
1
vote
0answers
18 views

How to insert Comment metadata via REST API

I am trying to insert comment from my android app , i am using REST API and POST method /wp-json/wp/v2/comments/ The method is working great , but I would like to include metadata when inserting ...
0
votes
0answers
10 views

Easy way to create a “add comment ” widget for a special post?

is there a easy way to create a "add comment " widget for a special post ? so whith it, a user can add a comment directly from home page to this post. Please...help
2
votes
1answer
32 views

What should I hook to add extra fields to comments?

How do I add fields to the comment form, then display the data in the comment? E.g. the header/footer of a comment. Would it require template customisations?
0
votes
0answers
38 views

I can't post comment via REST API

I try to insert comment via REST API , but i get this error : Query parameter not permitted: author I followed this docs and author is one of the arguments this is the link test that i use https:/...
1
vote
1answer
25 views

How to moderate (manually approve) comments of a specific (registered) User

I have a WordPress blog that gets a ton of comments. I have a freelancer that does support on the blog and replies to these comments. In a tryout phase, though, I'd like the comments of this support ...
1
vote
1answer
23 views

In wp_list_comments(), what is a short_ping?

I've been looking at the documentation for wp_list_comments(). One of the options is 'short_ping' which is documented thus: ( boolean ) Whether you want to use a short ping. What on earth is a "...
0
votes
0answers
17 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
7 views

Need to output comment_form() function inside a foreach loop

Im trying to display a comment box inside a foreach loop however the comment_form function outputs before anything else. Here is the code I'm trying. Everything is displaying, just not in the right ...
1
vote
0answers
18 views

Comment pagination not working

I am trying to have pagination for comments with a widget. The comments are getting loaded properly but the pagination does not work. I have set the pagination in the WordPress set to 3 as well. ...
0
votes
1answer
18 views

How pass args to wp_list_comments callback?

i need to pass an arg to function that i am specifying as callback for wp_list_comments public function ggowl_comment_lister($ggowl_id,$icon_html){ $args = array ( 'post_type' => '...
0
votes
1answer
19 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
35 views

How to get the current post ID in comments.php?

I want to retrieve the comments of the current post in the comments.php file. I have this: <?php if (comments_open()) { $args = array( 'post_id' => "|what to put here ?|", ...
0
votes
0answers
22 views

How to add <div> inside WordPress comments loop?

I know we can add in posts loop using in index.php and in single.php by filtering the content but I don't know how to add after certain comments. For example, if a post have comments, after 30 ...
1
vote
1answer
14 views

How to auto empty comment trash after X days

I know how to programmatically delete comments that are X days old but they then go to the trash. How do I empty the comment trash every X days? function ...
0
votes
1answer
17 views

I cannot view the comments

I recently developed my wordpress site www.fingeroffury.com for blogging. I have put up a couple of posts which have garnered comments. Unfortunately the comments do not appear on individual posts. I ...
0
votes
1answer
18 views

Ajax Comment Upvotes - Votes don't always register

I'm trying to create a simple ajax-based comment upvoting system for Wordpress. I've managed to build most of it, but now it seems that most of the time the upvotes don't register. They do register ...
0
votes
0answers
8 views

How to hide wordpress post comment and add some text before and after the list of comment?

In my WordPress site I am showing all comments of each post in comments.php file using this code: wp_list_comments( array( 'style' => '<div>', 'per_page' => 10,...
0
votes
1answer
27 views

Comment System showing different type of IP

I am observing different type of IP in comment. IP is like this 2409:4064:695:f112:bb92:1b9a:de27:d3fb Website is nvshq.org Is this any type of spam or security concern?
0
votes
1answer
32 views

How do I add class to an admin comment?

When I customize the wp_list_comments() output, how do I add a class to the admin comments? Relevant code: <?php wp_list_comments( array( 'style' => 'ol', 'callback' => '...
0
votes
1answer
27 views

Can't get ID of post that relates to the comment

I added custom checkbox to the comment form. I am trying to write the post ID of this comment in the database. But without success. I'm trying with something like this: add_action( 'comment_post', '...
0
votes
0answers
45 views

how can I send comment_id to a function of my plugin [duplicate]

I want to receive $comment_id in my custom function in my plugin. I mean when a user submit a comment, I need to pass $comment_id to add_custom_comment_page(). How can I do that? inside my plugin: $...
0
votes
0answers
13 views

how to set 2 meta_keys for a comment and get them related to 2 meta_keys

I want to set 2 meta_keys and meta_values for comments. I have a page called devices. in devices page, there are a lot of devices. when user click on each specific devices, it redirects to a specific ...
0
votes
0answers
9 views

Filter unanswered comment on admin view

Good morning, I would like to know how to add a filter, in the comment manager page, with which to display only the comments that have not received any response. In this way I can decide which ones ...
0
votes
0answers
41 views

How can I enable comments on category page but not home page?

I would like to enable user comments for posts in one category only, and only on the page for that category (category-$slug.php). Comments should not be enabled for those posts on the home page. What ...
0
votes
0answers
23 views

comments_template() not working, even after wp_reset_postdata() is called?

Hey guys I can call comments_template() at the top of my app and it works. But when i try to call it at the bottom it is empty. Here's what I tried: calling wp_reset_postdata() after each loop. No ...
-3
votes
2answers
38 views

how to remove post comment box from my website? [closed]

i want to remove comment section from my home page of website
0
votes
0answers
40 views

Assign comment author link with profile link

I want to assign comment author link to author profile link (if comment author email is registered). Profile permalink is /user/UserName I've come over this code which is link to author posts url- ...
0
votes
1answer
103 views

Why is comments_template() working without a comments.php file?

I want to be able to style the comments section to work with the theme I am building. I do not have a comments.php file in the website however when I include: <?php if ( comments_open() || ...
1
vote
1answer
27 views

comments.php keep comment date/time but remove date/time's #hyperlink

I've googled this issue and can't seem to find a solution... In the comments, I'm trying to remove the hyperlink from the comment date/time where when you hover over the comment date, it hyperlinks (...
0
votes
0answers
16 views

How to create custom administrator panel page or subpage?

I'm struggling with creating custom subpages in wordpress admin panel. I'm interested in creating any custom subpage, which is going to look like a default administrator screens with some ...
1
vote
0answers
106 views

How to disable comment flood temporarily in a single scope

I am flooding comment with my plugin in a reasonable manner: function log_my_comments($post_id) { $my_comments = get_my_comment_data($post_id); foreach($my_comments as $my_comment) { ...
0
votes
1answer
23 views

stop url changing when user comments

When a comment is posted on a blog post the url of the page changes. Is there a way to prevent this from happening. I need to show my post in a popup and it is replying on the url, when a comment is ...
0
votes
1answer
26 views

wordpress admin ajax trash_comment

I'm trying to add a trash_reason when someone delete a comment from the wp admin. I managed to add a thickbox with a dropbown listing deletion reasons and passing / updating the value of selected ...
0
votes
1answer
15 views

Disqus comment system not show

I've installed the disqus comment system plugin. I need some help to use it, I'm not able to display the comment box inside my post or pages. I'm using a custom theme, and there is no a comment.php ...
1
vote
1answer
22 views

How to allow more HTML tags in comment for a certain comment_type

I'm using a custom comment_type for my plugin and that comment type is connected to only a custom post_type. And now I want to add the TinyMCE Editor to the comment section, and want to allow more ...
0
votes
1answer
38 views

Yoast makes comment_reply_link function output plain link to comment instead of reply link

EDITED - I discovered that my problem only arises when the Yoast plugin is active. But I want to keep Yoast active, so my updated question is: Any idea what to do for comment replies working while ...
0
votes
0answers
14 views

Closing Comments conditionally in comments.php

I have a website running shapely as my theme, and I am trying to allow only logged in members to see comments on a post, and restrict anyone but administrators from commenting. I would like comments ...
0
votes
1answer
37 views

how to make author to write comment on only his own posts?

i want restrict my registered authors to write comment to other posts except his own posts. Is it possible? I have no idea how to do it. May be need conditional logic but how?
0
votes
2answers
44 views

How can I automatically delete comments that contain a URL?

My WordPress website is being bombarded by spam comments. Nearly all of them contain a valid URL. How can I delete these comments automatically? I don't want to put them into the review queue; I just ...