Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Displaying cover image BuddyPress 2.4

@sm60

Participant

Just one quick thing. Is it possible to set this up so the default cover image works?

$cover_image_url = bp_attachments_get_attachment( 'url', array( 'item_id' => bp_displayed_user_id() ) ); doesn’t work for the default cover image:

function your_theme_xprofile_cover_image( $settings = array() ) {
        $settings['width']  = 1000;
        $settings['height'] = 333;
	$settings['default_cover'] = 'http://mysite/link-to-default-coverimage.jpg';
 
    return $settings;
}
add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_theme_xprofile_cover_image', 10, 1 );
add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'your_theme_xprofile_cover_image', 10, 1 );
Skip to toolbar