<p>Viewing <?php echo get_total_forums() ?> forums</p>
Call to undefined function get_total_forums()
<?php
require_once( BB_PATH . BB_INC . 'functions.bb-statistics.php' );
echo '<p>Viewing ', get_total_forums(), 'forums</p>';
?>
Thanks! that works great. To go deeper into that code a code that does “forumS” for more than one and “forum” for just one?
So the functions in bb-includes are not included on the front end or something? Why would you need to include them again? Are they just admin functions?
To go deeper into that code a code that does “forumS” for more than one and “forum” for just one?
$tf = get_total_forums();
printf(__ngettext('Viewing %d forum', 'Viewing %d forums', $tf), $tf);
functions.bb-statistics.php
isn’t automatically included. The statistics.php
file (https://trac.bbpress.org/browser/tags/1.0.2/statistics.php#L5) does include that file as well.