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)

  • jcfromkc
    Participant

    @jcfromkc

    Trying to figure this out too.


    D L
    Participant

    @damon18

    I’d like to be able to do this, setting the cover image is difficult for users since it needs to be the correct size and aspect ratio and cant be moved around or cropped like the profile image.


    Back to Front
    Participant

    @traverser11

    unsolved mystery?

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