• Resolved isadex

    (@isadex)


    Hi there! I’m kinda new at this and I’m facing a problem which is the following: in the user profile, in the “docs” tab it only shows the user’s documents (“user docs” and “edit by user”) and I would like all documents to appear as well (that the user has access) in this tab, not just their documents.
    I’ve looked everywhere on the internet and here on the forum, but haven’t found a solution.
    I use Buddypress 10.2.0 and Youzify 1.1.8 (and I have no other issues with BP Docs)
    Btw, thanks for this amazing plugin

    • This topic was modified 4 years, 2 months ago by isadex.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Boone Gorges

    (@boonebgorges)

    This behavior is by design. Since you’re looking at a user profile, it only shows Docs belonging to that user.

    To see a list of all Docs, visit the main Docs directory at example.com/docs.

    If you really need all Docs to appear on a user tab, you could do it with a custom filter. Something like this:

    
    add_filter(
      'bp_before_bp_docs_has_docs_parse_args',
      function( $args ) {
        if ( bp_is_user() ) {
          $args['edited_by_id'] = [];
          $args['author_id'] = []; 
        }
    
        return $args;
      }
    );
    

    It’s possible that this filter will have side effects, since it changes the designed behavior. But it could be a starting point for the customization.

    Thread Starter isadex

    (@isadex)

    Sorry for taking so long to respond here, but I managed to do it another way by putting the documents directory in the admin bar. Thank you for your support anyways 🙂

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

The topic ‘All docs in profile tab “docs”’ is closed to new replies.