Count parent comments & replies separately?

here’s a quick and dirty method… in functions php, we create a callback function for wp_list_comments() which will count our comments: $GLOBALS[‘parent_comments_count’] = 0; $GLOBALS[‘child_comments_count’] = 0; function count_comments( $comment, $args, $depth ) { $GLOBALS[‘comment’] = $comment; if($comment->comment_parent==0): $GLOBALS[‘parent_comments_count’]++; else: $GLOBALS[‘child_comments_count’]++; endif; } then, in our template where it calls wp_list_comments(), we add another with … Read more

Block comments from search engine indexing

To my knowledge, there is no easy way to achieve what you want. What I think you would need to do is two parts: Detect page views by search engine spiders In your page templates, only include include the comments when the viewer is not a search engine spider. Should be straightforward, but not trivial. … Read more

What is the server IP comment hack

You get this if $_SERVER[‘REMOTE_ADDR’] of a ping/track back doesn’t match the IP address of the URL the ping back comes from allegedly. Let’s say someone claims to send a ping back from example.com but the request IP and the server IP for example.com are different – the ping back is marked as spam. The … Read more

How can I change the link in comment form “Log in to post a comment”?

the link is called from within comment_form() (/wp-includes/comment-template.php line 1539) : ‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( ‘You must be <a href=”https://wordpress.stackexchange.com/questions/71100/%s”>logged in</a> to post a comment.’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( $post_id ) ) ) ) . ‘</p>’, and uses wp_login_url() (/wp-includes/general-template.php lines 224+) which uses a filter on its return: return apply_filters(‘login_url’, … Read more

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