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.

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

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