Skip to:

How to get all current group’s doc ids in array?

  • Hello!
    I would like to show a compact list of current group’s recent docs in the sidebar or group header.
    All I need is an array of doc ids, but I can’t find the correct function.
    I can’t even query the database for this id’s because their connection with groups table is not so obvious for a novice like me :(
    I hope there is a simple function to do that.
    I will appreciate any help with this!
    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Finally, I found a way to show recent docs, but i am sure there should be some easier methods to do it.

    `function show_recent_docs(){
    global $bp, $wpdb;
    if (isset($bp->groups->current_group->id)) {
    $output = ‘

    echo $output;


    Avatar of peeld


    So, you could use a plugin like PHP-Snippets, put the above code in a snippet, then use the shortcode in a widget to call it? Or, use PHP-Exec and put the code itself in a widget?

    Avatar of shanebp


    Or you could put the function in bp-custom.php
    Then just call it where ever you want between php tags.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.