Displaying Post Count In bbPress (1 post)

  1. Hardeep Asrani
    Posted 2 years ago #


    I wanted to display user post count reply their forum reply in bbPress. Just like other forum software. So I found a useful tutorial at this link.

    He said that I should replace:

    <?php bb_profile_data(); ?>

    with the following code

    <?php bb_profile_data(); ?>
    <div id="user-stats">
     global $bb_table_prefix;
     $query1 = "SELECT COUNT(*) FROM ".$bb_table_prefix."posts WHERE poster_id = $user_id AND post_status = 0";
     $query2 = "SELECT COUNT(*) FROM ".$bb_table_prefix."posts WHERE poster_id = $user_id AND post_status = 0 AND post_position = 1";
     echo "Forum Posts: <b>".$bbdb->get_var($query1)."</b> &nbsp; ";
     echo " Topics Started: <b>".$bbdb->get_var($query2)."</b>"; ?>

    Okay, but there is only one problem...where the hack is >>> <?php bb_profile_data(); ?>

    I can't find <?php bb_profile_data(); ?> in any bbPress files...please help me out quick!!

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Hardeep Asrani
  • This topic is not resolved
  • WordPress version: 3.5.1