Skip to:
Content
Pages
Categories
Search
Top
Bottom

Setting default user cover image


  • pandafoxxxx
    Participant

    @pandafoxxxx

    Hello,

    After following the codex and googling for hours, I just can not set the default cover image for users when they first register. I use the latest version of wordpress and buddypress.

    functions.php

    
    function your_theme_xprofile_cover_image( $settings = array() ) {
    $settings['default_cover'] = 'http://www.planwallpaper.com/static/images/colorful-triangles-background_yB0qTG6.jpg';
     
    return $settings;
    }
    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_theme_xprofile_cover_image', 10, 1);

    member-header.php

    
    <?php $cover_image_url = bp_attachments_get_attachment( 'url', array( 'item_id' => bp_displayed_user_id() ) ); ?>
    <img src="<?php echo $cover_image_url; ?>">

    Website: local

    Edit: I CAN set an image in the profile tab and it shows up like normal.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar