The tag has no usage guidance.

learn more… | top users | synonyms

6
votes
2answers
225 views

How to wrap submit button of comment form with div

Is there a way to wrap the submit button with html element while using wordpress function comment_form function. $comments_args = array( 'id_form' => 'main-contact-form', ...
4
votes
2answers
149 views

Comment Walker vs. Comment Callback

I've been messing around with custom comments this week and I'm trying to figure out when I'd want to use a walker and when I'd use a callback... There's some things I can't quite figure out how to ...
4
votes
2answers
1k views

How can I limit the number of comments per registered user per day in wordpress?

I found this code here on WPSE: global $current_user, $post; $args = array( 'user_id' => $current_user->ID, 'post_id' => $post->ID ); $usercomment = get_comments( $args ); if ( 1 <= ...
3
votes
0answers
77 views

How to hide “Trackback” on paginated comments

My Setup: On my Single's page I have used this comments_template('', true); to separate Trackback's & regular comments. The Heading "Trackbacks for this post" shows up only if a post has ...
2
votes
3answers
298 views

How to get last comments but not from admin (or other specific user role/capability)?

I'm using get_comments to show lastest comments i.e.: <?php global $comments, $comment; $comments = get_comments( array( 'number' => '5', 'status' => 'approve', 'post_status' => '...
2
votes
1answer
1k views

Warning: call_user_func_array() expects parameter 1 to be a valid callback, func

I have installed Wordpress in my localhost server. I am a creating custom menu. When I try to remove the existing "primary" menu from it, I get this error Warning: call_user_func_array() expects ...
2
votes
1answer
865 views

How to display comments on different page

I am creating a reviews site and I want to display the customer reviews (comments) on a separate page from the single-restaurant.php. I'll just have a link that says (Read reviews/ add yours). I ...
1
vote
1answer
148 views

Add classname comment template from functions.php

I want to add an extra classname to my comment template (the div wrapper before the post itself) which is stated in functions.php. The classname in functions.php is an extra field in my users profile ...
1
vote
1answer
92 views

Passing arguments to wp_list_comments callback function

One can customize single comment markup using the callback argument in wp_list_comments like this: $args = array( 'callback' => 'my_callback', 'avatar_size' => 48, 'type' => 'comment' ); ...
1
vote
1answer
214 views

How to reorganize the items returned by wp_list_comments()?

I'm new to WordPress theme development and learning by building a new theme of my own. I want to reorganize the items returned by wp_list_comments(). I created comments.php in my theme folder and it ...
1
vote
3answers
180 views

How to change commenter links to /user/user_id?

I would like to change the commenter links as shown in this screenshot: In my test plugin at GitHub I have first tried the following code: define('PROFILE', '<a href="/user/%s" rel="external ...
1
vote
1answer
878 views

How to add a privacy-checkbox in comment-template?

i need to add a privacy-checkbox to the file comment-template.php. I created the checkbox and a paragraph and it looks fine, so far. <input type="checkbox" name="privacy" value="privacy-key" class=...
1
vote
1answer
128 views

How to enable commenting system in Wordpress

I am learning how to create custom Wordpress theme from this pageand everything is working except commenting system because they haven't described how to enable it (they only used <?php ...
1
vote
1answer
35 views

Order of Operation for these three hooks

What is the order of firing for these three hooks? add_filter( 'comments_array', array( $this, 'BuildCommentsArray' ), 10, 2 ); add_action( 'preprocess_comment', array( $this, 'write' ), 10, ...
1
vote
1answer
524 views

using comments_template() in custom single-portfolio.php

I am wanting my users to be able to post comments on my portfolio page. Ive created a portfolio page using custom posts. On my blog i am using the comments_template(); and then on the comments.php i ...
1
vote
1answer
631 views

ol children instead of ul children

I've created a new walker class to display a custom layout when using the wp_list_comments(); function and this is perfect, the only thing is that all replies to one comment are listed in a <ul> ...
1
vote
1answer
832 views

how to properly use comments-template.php

I want to modify comments form for both logged in users, and for those who are not. I modified the form for those who are not logged in by changing my comments.php but I'm not quite sure how to ...
1
vote
2answers
3k views

How to call wp_list_comments() outside of the comments template?

I'm simply typing wp_list_comments() in page.php but nothing is shown. But if I put the comments_template() tag there, then the comment form, comments and pings are shown. Why is that, why can't I use ...
1
vote
1answer
51 views

Get all images in post and comments like Twitter before post title

I want to know if it's possible to get all the images that are in a post and his comments, make them a thumbnail and put it before (or in a sidebar or something) the post title to show, just like ...
0
votes
2answers
454 views

comments_number not displaying

Live site I'm using <?php comments_number( $zero, $one, $more ); ?> on home.php to display number of comments in the post-meta. Problem is, it's not showing the number despite there being one ...
0
votes
1answer
151 views

Change HTML Produced by wp_list_comments()

I am developing a WordPress theme for which I would like each comment's timestamp wrapped in in a <span> element for the sake of styling it with CSS rules. However, the wp_list_comments() ...
0
votes
4answers
134 views

Custom setup of wordpress comments that are displayed

I have setup in admin to have 5 comments per post display, which is what I want, and newest at the top. But the problem is when a 6th comment is made it is the only one displayed and you can read ...
0
votes
1answer
33 views

Appended comments but they show up above the content instead of below

I am trying to append a comments template to the end of the flash object in this plugin file. Below is the full code. To pinpoint exactly where I added the comments template, please refer to this ...
0
votes
1answer
6k views

How to place comments_template(); outside the loop?

I am making a new template and I need to place the comments template outside the wordpress loop and just above the footer in the single.php file. I searched on google and the best answered I could ...
0
votes
3answers
1k views

adding a text message beside the comment submit button

What is the cleanest way to display a text message beside the submit button like this in screen shot: I am currently doing it by editing the file wp-includes/comment-template line 1577 (wordpress 3....
0
votes
2answers
32 views

How can I embed comments plugin to my own website?

I am looking for a way to embed WordPress comment form to watch.php in order to allow user to comment on a specific video. Can you tell me how?
0
votes
2answers
86 views

Custom comment field not showing when logged-in

I've added a custom field in comment by using function comment_label($fields){ unset( $fields['url'] ); $fields['rate'] = '<p class="comment_form_rate" id="rate_recipe"> ...
0
votes
1answer
43 views

Custom comment link

How can I customize my comment link without modifying comment-template.php file line 676: $link = $link . '#comment-' . $comment->comment_ID; I would like to get the same link just little ...
0
votes
1answer
206 views

Change Wordpress comments url / word

Is this possible? For example, I want to change http://mysitesitesite.com/post-name/comment-page-1/#comment-452 to http://mysitesitesite.com/post-name/custonname-1/#customname-452 What should I ...
0
votes
3answers
949 views

Embedding Youtube video on comments

In my posts, you can embed a video of Youtube by adding the link to the post. You don't have to do anything beside that. On my comments, I can't do the same thing. Is it possible to embed Youtube ...
0
votes
1answer
1k views

comments_template not working correcly in custom template files

In a template file that I am using as page, I want to allow only 2 users to post comments and allow to all other users to only see these comments( not allow them add comments). my template file is: &...
0
votes
2answers
727 views

I don't have comments.php… how do I customize my comment fields

My page in question is here. I have tried to add a comments.php to my custom theme so I can remove the website field and so I could edit the default values of the fields and remove the labels. When I ...
0
votes
1answer
1k views

customizing TwentyEleven comments template

Typically I don't utilize comments on my sites, however I'm using the comments functionality as a sort of live-feed testimonials page. To do this, I've borrowed comments.php and the comments portion ...
0
votes
1answer
25 views

How can I return the result of my custom function?

I have used the following source code to add an extra city field to my WordPress comment form: <?php /* Plugin Name: Comment meta data test Version: 1.0 Plugin URI: http://wpengineer.com ...
0
votes
1answer
33 views

Change the “Allow comments” text for admin edit screen for custom post type?

I have a custom post type that uses an alternative comments template. I modified the comments template for my custom post type to function like a five star review system. Is there a way I can change ...
0
votes
2answers
26 views

How Can I display the Current Logged-In User's Comment at the Top of the Comments Section in Wordpress?

What I'm trying to do is show the current logged in user's comment at the top of the list in the comments section in Wordpress on any given post. I don't care if it is just duplicated at the top and ...
0
votes
1answer
58 views

Paginated Comments “reply” does not work!

I use plugin Paginated Comments. I edit template and CSS in paginated-comments.php but "reply" does not work. "reply" does not appear at all. http://i.imgur.com/ieIeadO.jpg (There should be a button ...
0
votes
0answers
58 views

Create Custom Comment Type

I have a page when I want multiple comment_template, so I want each of my comment_template to have different type so I see different comments in those 2. My get_comments look like this $args = ...
0
votes
0answers
24 views

Comments page id wp_list_comments

Under post i want to display last five comments. At next comment page or after click button "show more comments" I want to display all comments or set quantity comments to display. How can i do it? ...
0
votes
0answers
42 views

How can one display the comments and comment form by supplying a post id?

I have a masonry layout of post images. When you click on one it shows the larger image and some event details. I'm trying to print the comment form along with those details. I've tried simply ...
0
votes
0answers
32 views

How do I change the button “comments”?

How do I change the button "comments" in theme twentyfifteen to "..."? I'm assuming it's in the comments.php file? I could be wrong. I'm referring to this area. <?php /** * The template for ...
0
votes
1answer
42 views

reply to comment excerpt instead of author in comment title

One can reply to a comment using Reply link, below each comment item in comments list. According to codex, by clicking that link and using comment_form_title function like this: $replytext = 'Leave ...
0
votes
1answer
254 views

comment_post action hook running on page load instead of after a comment is posted

I am trying to call a function after a comment is saved to the database, see below... add_action('comment_post', 'myFunction', 10, 2); do_action('comment_post', $comment_ID, $comment_approved); I ...
0
votes
1answer
22 views

Redirect first time comments

So I want to add a comment redirect code to my comment form. I know I have this part right here: <input name="redirect_to" type="hidden" value="http://domain.com/thank-you" /> So what I want ...
0
votes
1answer
63 views

How to edit label_submit styling?

This is going to sound like an easy fix, but I am looking to style my submit comment button on my comment form. Currently the code in the $args = array looks like this: 'label_submit' => ...
0
votes
1answer
103 views

Increase Comment Author Gravatar Size On WordPress Default Comment Function

I am new to WordPress theme development. I am designing a new theme and using less codes and file as I am starting from basic. I am adding comments and comment form in my single.php using <?php ...
0
votes
1answer
85 views

How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?

Sorry if the title was confusing, I'm having a bit of trouble explaining here. I'm working on a theme for my site, and I'm using a slightly modified version of a custom comments template found here. ...
0
votes
1answer
1k views

Enable nested comments in Theme

I am trying to enable nested comments in my theme. I am new to all this stuff but I am doing my best. This is the code that I have in my comments.php <?php if ( get_comment_pages_count() > 1 &...
0
votes
1answer
39 views

How to maintain changes to comment-template.php

I have made some custom changes to the file wp-includes\comment-template.php. These changes are periodically lost and I assume it's related to updates for WordPress and the file is modified/re-written....
0
votes
0answers
63 views

Display Comment Form on dedicated Page for each post

I have the following requirement to complete and i didn't figure out how to do it. Inside a post, for each post, to call comment form on a dedicated page, in dedicated page the user post a comment ...