Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
10 views

How to display recent comments of a specific taxonomy?

I have a custom taxonomy, for example region. Under this I've added several sub terms, such as Europe, Aisa, America. How do I display the comments for posts aligned to Europe only? Edit: I found a ...
0
votes
0answers
6 views

Group Disqus comments per URL

My website has a dynamic post based on its URL params. Basically, it's a common post but its content has only a short code that builds the final HTML. It seems that the Disqus comments are bound to ...
0
votes
0answers
14 views

Errors while trying to add Disqus to WordPress manually

I've been trying to add Disqus to my website for a while now. And I've used the universal embed code they are suggesting in their documentation. I add it to my single.php page with my shortname and ...
0
votes
0answers
12 views

Floating Comments

Is it possible to add a floating comment bar to a Wordpress site, similar to the one used at AminoApp: https://aminoapps.com/c/k-drama/page/blog/my-favorite-drama-quotes/...
0
votes
0answers
7 views

Comments show perfectly on regular posts, but won't display on custom posts

As the title says, I'm seeing no comment entry fields for custom posts, but they're working just fine for standard posts. In my functions.php: function custom_post_register() { // creating (...
1
vote
0answers
12 views

Share the same comments between more pages

Scenario: I need to share the same comments between more pages. Instead of simply using the post ID to load comments, I want to use a combination of two taxonomies' id. For instance: Taxonomy 1: tag ...
0
votes
0answers
13 views

A list of the top Authors with total comment count on a wordpress instance

I am trying to get a list of 10 comment authors with the total comment counts beside the username. Is is a user query or a should I use wp comment query? It should look something like this: John 10 ...
0
votes
0answers
14 views

how to fix Undefined variable: aria_req in comments.php

<?php // You can start editing here -- including this comment! if ( have_comments() ) : ?> <h2 class="comments-title"> <?php $comments_number = get_comments_number();...
0
votes
1answer
16 views

I want to change the Wordpress comments file

In the standard structure of Wordpress, a warning page appears when the user makes spam or goes too fast. The link structure of the warning page is "/wp-comments-post.php". Briefly (see images) https:/...
0
votes
2answers
22 views

Change commenters email to display name

wordpress's default Recent Comments widget is showing the user's email address instead of their display/first name.. get_comment_author() just changes the email address to 'anonymous'.... What do I ...
0
votes
0answers
16 views

Display data from 'comments_clauses' in comment object

I want to add display name from users table to the comment object in WP, but failed. I don't know where is the error in my code below. This is my code. add_filter( 'comments_clauses', '...
0
votes
0answers
22 views

how i nested depth show under div of start_el() without style padding

I want to make nested list of comments displayed in nested divs of .media-body, like in the image below. How can I modify the code in wordpress in the start_el() function? it is not created nested ...
0
votes
0answers
16 views

How to change comment text while comment posting?

Can I add a filter to the wp_insert_post while posting a comment? I want to decode PHP tags before posting comment. Here is my code: function my_function( $comment_id, $comment_object ) { $...
0
votes
3answers
63 views

Automatically reject a comment if website field contains anything

I've done a bunch of searching but can't seem to find a hack to do this, all I can find is how to remove the website field from the form. I want to leave it there, but if someone enters a url into the ...
0
votes
0answers
18 views

Write html code in comments

For example i am writing this html code into comment textarea <pre><code class="language-php"><?php echo esc_html( get_post_meta( get_the_ID(), ‘_spp_count’, true ) ); ?></code&...
0
votes
0answers
19 views

User can post only one comment per day on some posts based on ID

I want to limit the number of comments per user (registered or not) per day. i used the codes of the answer in the following page but it did not work. i put the first code in the Functions.php and ...
0
votes
0answers
21 views

fake comments from dashboard/back-end

Does anyone know if there is any plugin / code snippet which allows to enter/crate a new comment from back-end ( by admin / being logged in as admin ) where user-ID / time etc. could be chosen?
0
votes
0answers
18 views

Can't show most recent comment on top with wp_list_comments() for WooCommerce reviews

I am trying to break my comments (reviews) on my single product page into various pages, having the latest comments displayed on top of each pages and the latest comments displayed on the first page / ...
0
votes
0answers
10 views

How to add reply comment feature in custom comment form

I have created a custom comment template; Here created a form and stored the data in my custom table. The stored data showing from table in frontend. This comment form is calling with in a loop for ...
0
votes
1answer
27 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(); ?>" ...
0
votes
1answer
18 views

The comment could not be saved. No comment_ID on comments

Every time I try posting a comment logged in as an admin, I get the following message: [ERROR: The comment could not be saved. Please try again later.] But when I actually go to the database, I find ...
0
votes
0answers
6 views

Use custom profile field in comment

On registeration I added 2 custom profile fields. How can I use these 2 fields on the comment section. For example I want to display the value of "City" field, just before the nickname, for example :...
2
votes
1answer
31 views

Does wp_new_comment expect a comment in HTML?

Should the comment_content in this example contain HTML? Or should it contain plain text? $comment_id = wp_new_comment([ 'comment_post_ID' => 1, 'comment_content' => 'Tom & Jerry', /...
1
vote
1answer
99 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
vote
0answers
27 views

Showing unapproved comments without login

I'm working on a wordpress theme for my website. My website doesn't allow to sign up and my theme's blog page have comments section and it allow making comment without login. But there is a problem ...
0
votes
1answer
27 views

How to direct user after comment save

I've been trying to direct the user to the specific page after they posted the comment, but that not luck for me. Here is the my code blocks My first try: add_action('wp_insert_comment', array($...
-1
votes
0answers
24 views

Comments to post content

How to batch move comments to post content? I plan to migrate from WP to static site like jekyll/hugo/hexo, but there are difficulties with exporting-importing comments.
0
votes
1answer
18 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
0answers
24 views

User Comments on separate author page

I have added the user comments to author page (archive template), after the blog posts if any. So on page www.my.blog/author we have blog posts and all the user comments display below the posts. ...
2
votes
0answers
25 views

Comment pagination - How to show determined number of comments on the first page?

I set 10 comments for every page. If I have 20 comments, it shows 10-10 on the first and last page. However if I have 11 comments, it shows 1 comment on the first page. How to display 10 comments on ...
3
votes
1answer
63 views

Why Allow Script Commands in Comments?

I noticed that if you are an admin or editor, you are able to put in script code like this in comments (not in the page/post editor) for admin/editor roles: <script>alert("Danger, Wil Robinson!"...
0
votes
1answer
43 views

Sent comments notifications to multiple users

I am new to wordpress I want to send email notifications for commenting in blogs. Currently it is going to only one user. I tried 'comment notifier' plugin but got negative result. I tried the below ...
0
votes
2answers
41 views

Moving FB comments at the end of page

I am using plugin "wpdevart facebook comment" for posting comments at the end of every post. They are displaying good But now I want to shift those comments little below of pagination and ads Or at ...
0
votes
1answer
24 views

Custom Avatars for Wordpress Comments VIA Website URL?

I've tried a couple different wordpress plugins and solutions but nothing is quite what I'm looking for. I want to adjust my theme/wordpress so that avatars for my Wordpress commenters are grabbed ...
0
votes
0answers
77 views

“Comment is awaiting moderation” gone!

As i said this notification is gone after new Wordpress update. I can't find solution. My comment lists coming with this code: <ol class="comment-list"> <?php wp_list_comments( ...
1
vote
0answers
21 views

How To Add a Transition style to Wordpress Comment Box? [closed]

What I am looking for is to have the comment box slide down when a user clicks the reply button. I have tried several ways of adding my own CSS transition to the respond id and even did a height ...
1
vote
0answers
24 views

How to make an WordPress element sticky? [closed]

I'm trying to make an element sticky on my article. This is the element- Name: WP-Review <div Class=sticky-review> <?php echo do_shortcode("[wp-review]"); ?> </div> I tried CSS- ...
1
vote
0answers
14 views

WP_Comment_Query - Get comments and answers separately

I was developing a theme and this time I chose to use the bootstrap4, I found some difficulties in the way but I managed to solve them and the result was satisfactory, however creating my comments.php ...
0
votes
1answer
14 views

Comments/Discussion Not enabled on newly created posts/pages

Like the title says, new posts and pages do not automatically have comments enabled, even though I have the option checked in discussion settings. Any ideas why it may not be working?
1
vote
0answers
44 views

Send reply with pre-prepared answers

Do you know the way to ask users' comments with pre-prepared answers? What i want is very simple and more like a comments section that only can select and remove emojis without typing and have 4 ...
1
vote
1answer
15 views

changing font size and font of a custom message added after comment

hi i have added a code in function file of the theme to show a default custom message after the user leaves a comment of the blogposts . it reads like this . add_filter('after_comment_text', '...
1
vote
0answers
29 views

posts comments goes to trash

My website was working fine until today, I just discovered that all comments made goes straight to trash. I did not install new plugins, I don't have akismet. It just started. I have deactivated all ...
1
vote
0answers
10 views

wp-comment author- url +, email filter hook

Don't know how to change '@' and 'HTTP/S' in ALL comment-stuff, so those will be displayed in WP as unclickable contents. Do you have the knowledge and patience to straighten the following lines? ...
1
vote
0answers
21 views

How to handle upvotes and downvotes of disqus comments after importing disqus comments to wordpress?

I wanted to migrate disqus comments to my WordPress. I found some guide post https://www.ampercent.com/migrate-disqus-comments-back-wordpress/21729/ https://help.disqus.com/import-export-and-syncing/...
0
votes
1answer
18 views

Comment field override

i have a strange problem with altering comment text field in single post. I've created $fields = array(). Inside this array, besides other fields, I've also added: 'comment_field' => '<p ...
0
votes
1answer
93 views

How to stop ultimate members to redirect comment authors to user profile?

I'm having a problem with the Ultimate Member plugin. The comments author links get redirected to the user profile. I need the basic WP feature- pointing to author URL/website. The plugin is ...
0
votes
0answers
31 views

How to show comment author URL next to comment author?

By default, the comment author links to their URL. But I have changed that to their profile. Front-end profile generated by a plugin. Now when anyone clicks on author name they are redirected to the ...
1
vote
1answer
51 views

Problems with comments callback (Argument #1 is not an array?)

I built my callback function using class-walker-comment.php as a reference and am at a loss as to why it's not working. Any help is greatly appreciated. The issues I'm encountering are: 1) Avatars ...
1
vote
0answers
91 views

How to implement a rating and review system for WordPress custom posts?

I want to have a rating and review system for custom post type. This is the method i am thinking of ->Create a custom post type ->Create meta fields ->Create a form to post reviews front end. But ...
0
votes
1answer
28 views

How to make comment reply available only for login members of a certain user roles only?

I use the default public WordPress comment system. But I want to make my comment reply only available to admin and author user roles. How do I achieve that?