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

Akismet plugin is deleting spam despite preferences

I would generally not recommend modifying files for Plugins that you do not control. Better would be to write your own site/custom Plugin, to control this hook: add_action(‘akismet_scheduled_delete’, ‘akismet_delete_old’); First, to stop the deletion altogether, simply call: remove_action(‘akismet_scheduled_delete’, ‘akismet_delete_old’); Then, you can set up a cron job (or similar), to fire the akismet_delete_old() function on … 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

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