How to add Change Profile Cover Setting in Profile Section

for this you need to follow these steps:

1.
add this CSS class ” profile-cover ”
in
vibebp>>members profile>>edit the members profile layout

2.

add this code in wplms-customizer.php file:

add_action('wp_footer',function(){
$user_id = bp_displayed_user_id(); 
if(!empty($user_id)){
$attachment = bp_attachments_get_attachment( 'url', array( 'item_id' => $user_id ) );

$image_path = $attachment;
?>
<style>
.profile-cover{
background: url(<?php echo $image_path;?>) !important;
}
</style>
<?php
}

});

3.
goto>>wp-admin>>settings>>BuddyPress>>Options>>

and then reload nav
from here:

Leave a Reply

Your email address will not be published. Required fields are marked *