Fork me on GitHub
Current releases are 2.1.1 (2 Aug 2014) and 2.0.18.13 (5 Aug 2014)
Ready for 2.1? Find out if your favorite plugins are compatible.
The 2.0 branch will no longer receive updates after Dec 2014.

[Solved] Showing number of comments on WP Widget?

edited October 2011 in Vanilla 2.0 Help
Is there a way to show number of comments on the WP Forum widget?

Answers

  • I achieved this by adding
    echo '<span>'.(($Discussion->CountComments) - 1).'</span>';

    after this line
    echo '<li><a href="'.vf_combine_paths(array($link_url, 'discussion/'.$Discussion->DiscussionID.'/'.vf_format_url($Discussion->Name)), '/').'">'.$Discussion->Name.'</a></li>';
    echo '<span>'.(($Discussion->CountComments) - 1).'</span>';

    in widgets.php
    wp-content/plugins/vanilla-forum/
Sign In or Register to comment.