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

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

Customizing comments pagination for bootstrap

Just replace that snippet for this one: <?php $pages = paginate_comments_links([‘echo’ => false, ‘type’ => ‘array’]); if( is_array( $pages ) ) { $output=””; foreach ($pages as $page) { $page = “\n<li>$page</li>\n”; if (strpos($page, ‘ current’) !== false) $page = str_replace([‘ current’, ‘<li>’], [”, ‘<li class=”active”>’], $page); $output .= $page; } ?> <nav aria-label=”Comment navigation”> <ul … Read more

WordPress Comments are automatically publishing

An administrator is normal the highest level of user in WordPress. If you want to approve every comments, even administrator comments, maybe you can use the moderation filter. If you go to Settings > Discussion Settings > Comment Moderation. You could setup an “cache all” filter. If you put all letters of the alphabet and … Read more