How to show Disqus comments and pingbacks?

The plugin you mentioned is only a single function so it shouldn’t be too heavy on your setup. It uses the comments_template filter to inject the pingbacks/trackbacks list into your page. But the plugin is using an extra manual SQL query and the template is constructed by hand, so there’s a room for improvements/simplifications. A … Read more

User can post only one comment per day on one page

Limiting comments per day and per user is already built into your current query. The only thing missing is a check for the post ID. Here’s a pretty convenient function/template tag: /** * @param int $limit * @param int $time * @param int $ids */ function is_user_limit_reached( $limit = 5, $time = 1, $ids = … Read more

Get threaded comments number

// inside your callback function: static $ancestors = null; $parent = (int) $comment->comment_parent; // Modify INITIAL VALUE here: $init_val = (int) 1; $is_child = false; if ( $parent > (int) 0 ) { $is_child = true; $ancestors[] = $parent; $child_counter = count( $ancestors ) + $init_val; } /* * Only needed in case you want … Read more

Display number of comment replies

In the wordpress codex function reference for comments, it looks like the parameter for the parent is not comment_parent but just parent. Which is weird and inconsistent because the return values are prefixed with comment_.

How can change wordpress comment reply text for specific pages only?

Code is not tested. But theoretically it should work: add_filter(‘comment_form_defaults’, ‘wpse337366_comment_form_modification’); function wpse337366_comment_form_modification($defaults) { // put your condition here if( is_page(‘my-page’) || is_singular(‘my_post_type’) ) { $defaults[‘title_reply’] = __(‘Leave a Review’); } return $defaults; } You can place the code in a plugin or your theme’s functions.php. The code will filter the default texts passed to … Read more

Does Akismet plugin expose any hooks, functions, class that can work with custom code?

I greped a slightly aging copy of the Akismet plugin and these are the hooks I found– filters first, then actions. admin.php:374: if ( apply_filters( ‘akismet_show_user_comments_approved’, get_option(‘akismet_show_user_comments_approved’) ) == ‘true’ ) { akismet.php:144: $akismet_ua = apply_filters( ‘akismet_ua’, $akismet_ua ); akismet.php:201: if ( $incr = apply_filters(‘akismet_spam_count_incr’, 1) ) akismet.php:336: $akismet_nonce_option = apply_filters( ‘akismet_comment_nonce’, get_option( ‘akismet_comment_nonce’ ) … Read more