How to show last comment on hover?

The comments_popup_link_attributes filter will allow you to output attributes within the link. function add_comment_hover_action() { echo ‘ onHover=”fireMyJSCode();”‘; } add_filter(‘comments_popup_link_attributes’, ‘add_comment_hover_action’); Alternately, you could hook into the comments_number filter to add a span wrapper around the comment number text with a common class name and the parent post id as an attribute. Then in JavaScript … Read more

Styling Admin comments in WP 3.1.3

Why not use: if ( user_can( $comment->user_id, ‘administrator’ ) ) { // current comment is from an administrator; // do something } As for putting the admin comments at the top of the comment list, you would have to modify the comment query itself.

Page comes up blank using w3 total cache [closed]

You can turn off caching for your wp_list_comments template by placing define(‘DONOTCACHEPAGE’, true); at the top of the page. Other constants available on a per page or template basis are: define(‘DONOTCACHEDB’, true); Disables database caching for given page. define(‘DONOTMINIFY’, true); Disables minify for a given page. define(‘DONOTCDN’, true); Disables content delivery network for a given … Read more

Display last comments on home page

A slightly more complete and less abrupt answer. <?php $args = array( ‘status’ => ‘approve’, ‘number’ => ‘5’ ); $comments = get_comments($args); foreach($comments as $comment) : // display any of the following indexes as you’d like var_dump($comment); endforeach; ?>

create separate page template for wordpress comments

That appears to be simply a Page template that outputs the “Recent Comments” Widget for comments and pings, and then (probably) another Widget that displays a list of most-commented Posts. If those indeed are Widgets, then you simply need to create a custom Page template, and instead of outputting a Loop, output a the_widget() call … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)