1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HowTo: Comments Evolved for WordPress and XenScripts

Show the correct WordPress and XenForo comment count

  1. LPH
    Step 1: Open the frontend.php file found in the directory /wp-content/plugins/gplus-comments/includes/lib

    Step 2: Replace the function comments_evolved_get_wordpress_count [lines 29 - 32]

    PHP:
    1.  
    2. function comments_evolved_get_wordpress_count() {
    3.   // global $post, $comments, $wp_query, $comments_by_type;
    4.   // return count($wp_query->comments_by_type['comment']);
    5.     global $XF;
    6.  
    7.     if( $XF->useXenForoCommentHandler() ) {
    8.         return $XF->getCommentNumbersFromCache($post_id);
    9.     }
    10.     else {
    11.         return $n;
    12.     }
    13.  
    14. }
    15.  
    This allows the comment count to include comments made in XenForo and in WordPress.