WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WordPress MU Sitewide Tags Pages] Comment numbers

[Plugin: WordPress MU Sitewide Tags Pages] Comment numbers

Viewing 8 replies - 1 through 8 (of 8 total)
  • “Does this make sense?”

    Yes, and I second your request.

    Has anyone found a workaround for this? Having updated comment counts would be very useful. Please post if so.

    me… need this one too

    Found this resource, but dont know how to implement

    http://rizapn.blogsome.com/2008/10/21/sitewide-tags-plugin-modification/

    I have the following copy ‘n pasted into the sitewide tags plugin(v0.4.0.1) and comment counts show as expected.

    function ds_sitewide_tags_get_comments_num($count) {
      global $blog_id, $wpdb, $post;
      	$tags_blog_id = get_site_option( 'tags_blog_id' );
      	if( !$tags_blog_id || $blog_id != $tags_blog_id ) return $count;
      	list( $post_blog_id, $post_id ) = explode( '.', $post->guid );
      	$base = $wpdb->get_blog_prefix( $post_blog_id );
      	$r = $wpdb->get_col( "SELECT comment_count FROM {$base}posts WHERE ID=$post_id" );
     	if( is_array( $r ) ) return $r[0] + $count;
      return $count;
    }
    add_filter('get_comments_number', 'ds_sitewide_tags_get_comments_num');

    Adding the above function only the the functions.php of the theme active on the main blog is better, then it’ll only fire there instead of on every comment form in the network.

    I tried that, for some reason it shows “Comments Off” on the tags blog though.

    Also, unrelated to comments, the title of the post doesn’t show on the tags blog, it’s Twenty Ten theme.

    I’m trying to get this to work as well. I’ve got a mod of the Twenty Ten theme and with the code in, I’m still seeing comments off. Any suggestions? Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress MU Sitewide Tags Pages] Comment numbers’ is closed to new replies.