Articles of wp list comments

Compact pingback list with favicons

On a blog with pingbacks and trackbacks (pings) enabled I want to show just a link with link text and a favicon of the external site in a compact list: no date, no text. How can I do that?

How to use a different database to list and manage comments in the backend

I need to make WordPress use another database (not the one specified in wp-config site-wide) on the “Comments” admin backend. I then must be able to edit, approve, delete etc. comments as usual. The database server I am going to connect to has been setup to accept external connections. I have a couple of ideas […]

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() function as I use it in my theme’s comments.php template does not seem to provide options to alter the HTML produced: <ol class=”comment-list”> […]

Limit comments displayed on basis of user_id

How can i limit comments displayed on the page – reviews by author_id. Lets say that the author_id to limit to is in variable $author_id_to_limit. Please tell me how to hook the function to do so. I would even like to know how to edit the no of post with this cuurent query.

Is it possible to make wp insert last comment onto another page

If we set wp to break comments into pages after X nr of comments and we have X+1 comments , wp only shows that last comment instead of showing X and move the comment from bottom onto the next page. Any help would be appreciated since it is a big deal for what I am […]

How to call wp_list_comments() with callback outside the loop

the template function as a callback argument of wp_list_comments function, and the template function takes three args:$comment, $args, $depth, like the template function that defined in the theme twentyeleven‘s functions.php, function twentyeleven_comment( $comment, $args, $depth ) { $GLOBALS[‘comment’] = $comment; switch ( $comment->comment_type ) : case ‘pingback’ : case ‘trackback’ : ?> <li class=”post pingback”> […]

What is comment_karma?

doing a var_dump on $comment object, I mentioned there is a comment_karma property. What is that?

Comment `Reply` link doesn't work if comments are loaded from ajax

I am writing a plugin that displays custom home page that is in fact only one post with comments. The first time home page is displayed by the initial call by php. Then user can click a menu button to get another post. This is handled by ajax. So the whole page does not reload. […]

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’ => ‘publish’ ) ); foreach ( (array) $comments as $comment) { echo ‘<li>’.$comment->comment_author.’ said ‘.$comment->comment_content .'</li>’ } ;?> Is there some way to override admin comments?! I know this tip using SQL […]

Customize comment list markup

While creating a new theme, we’ll have to customize the comment flow. For doing so there are two functions: wp_list_comments() and get_comments(). I am not very sure how to style the inner elements that appear from it such as Gravatar, comment description, comment author, etc. In order to do some styling for them, I first […]