Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Buddypress-docs count

  • Avatar of 4ella
    4ella
    Participant

    @4ella

    Latest WordPress & Buddypress , Buddypress default theme
    Question to @boonebgorges
    Hello, can you tell me pls. how can I display total number of Buddypress docs on bp-default index.php page? I have a little stats about how many members, posts , cats etc. I have on my home page, also with today’s count how many members, posts were published today, only tag I can’t find is tag for bp-docs, can you tell me that <? bp_count ?> tag?

    2.question – my bp docs tab count have never worked in the groups(members), is it already implemented or is it my probably some plugin conflict?

    Thank you Daniel

Viewing 1 replies (of 1 total)
  • Avatar of 4ella
    4ella
    Participant

    @4ella

    figured it out:

    <?php
        $numdocsposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE (post_status = 'publish' AND post_type = 'bp_doc')");
        if (0 < $numdocsposts) $numdocsposts = number_format($numdocsposts);
    ?>

    and call it
    <?php echo $numdocsposts ?>

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.