How to implement a WordPress comments function?
Use comment_form() not a self made code. See the answers to question 15179 for a working example of a comments.php.
Use comment_form() not a self made code. See the answers to question 15179 for a working example of a comments.php.
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
Comment markup – both the comments list and the comment reply form, will be in the comments.php template file. The contents of this file are entirely Theme-dependent, so any more-specific help will require the content of comments.php.
By default WordPress does not display an avatar for a pingback or a trackback – do they even contain an e-mail address? You can add these to the get_avatar_comment_types filter if you want to change this.
Just download twentyten and see how it works, it’s relatively simple to use it as an example. Nothing needs to go into functions.php for comments to work. You can use custom callbacks in there if you wish, but just a few template tags get the comments going <?php comments_template( ”, true ); ?> Is what … Read more
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
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.
Does your theme have a comments.php, or a loop.php? If you do look inside those files.
I think WordPress.com is an OpenID Provider, meaning that you can use the OpenID Plugin, and allow users to use their WPCOM account to register/login to your site. As far as I know, WordPress.org is not an OpenID Provider (though that would be a neat idea!).
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