Log file reports SQL Error processing child comments

It looks like this is a bug related to caching in WordPress v4.6.1 which you can follow on Trac ticket #37696. A proper fix is scheduled for WordPress v4.6.2, but in the meantime, you could try the following workaround reported by Rarst, who created the issue on Trac: Issue goes away if I disable Object … Read more

How to Orderby Comments by post title?

The WP_Comment_Query class supports ordering by: ‘comment_agent’, ‘comment_approved’, ‘comment_author’, ‘comment_author_email’, ‘comment_author_IP’, ‘comment_author_url’, ‘comment_content’, ‘comment_date’, ‘comment_date_gmt’, ‘comment_ID’, ‘comment_karma’, ‘comment_parent’, ‘comment_post_ID’, ‘comment_type’, ‘user_id’, ‘comment__in’, ‘meta_value’, ‘meta_value_num’, There’s a way to adjust it via filters so we can support ordering by the post title: $args = [ ‘status’ => ‘approve’, ‘post_status’ => ‘publish’, ‘post_type’ => ‘post’, ‘orderby’ => … Read more

Get the top level comment ID

Wait? Did you just state get_comment_ancestors() does not exist? What were they thinking… We can do this by looping through the entire comment thread until we find the top level comment. We identify it by parent_comment being set to 0: /** * Return the top parent comment ID * * @param $comment_id * @return comment … Read more

How would I add the comment count to this sub-pages of current page snippet

A custom walker can be passed to wp_list_pages() using the $walker parameter. Here is a custom walker named WPSE_Walker_Page_Comment_Count() which is based on the default page walker, Walker_Page(). We’re only overriding the start_el() method in this case. The output has been customized to include the comment count. First, add the walker code to your theme’s … Read more

WordPress – different icon image depends of comment number

There is a ready function for doing such action: Take a look here: https://codex.wordpress.org/Function_Reference/wp_count_comments This should really sole your problem as you can use an if statement deciding the picture, just remember you have to use the post_id in order to get the count. Thank you!

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