How / where is the wp_query object created for RSS feeds?

These files are not loaded directly, but similar to regular template files, only after the WP class is initialized. This class does the main query, which already can include the comments if the correct query variables are set. The execution flow is a follows, starting in the main index.php: require(‘./wp-blog-header.php’); require_once( dirname(__FILE__) . ‘/wp-load.php’ ); … Read more

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.