Skip to:
Content
Pages
Categories
Search
Top
Bottom

Retrieve cover image for $user_id ?


  • katanshin
    Participant

    @katanshin

    I need an example function that takes a bp or wp ID and retrieves the cover image url for that user’s cover image. bp_attachments_get_attachment doesn’t seem to work, I either get no output or the file path to the 0 user’s cover! I have no idea how to proceed, please put me in the right direction.

Viewing 1 replies (of 1 total)

  • mohdumar1654
    Participant

    @mohdumar1654

    Try this,

    $args           = array(
    	'item_id'    => get_current_user_id(),
    	'object_dir' => 'members',
    );
    $attachment_url = bp_attachments_get_attachment( 'url', $args );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar