Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to use bp_is_user_change_cover_image in wordpress sidebar?


  • jameshh93
    Participant

    @jameshh93

    Hello, sorry for th dumb question but how would I go about echoing the cuurent loged in users cover image isnide the side bar?

    I have found this function but I have no idea how to use it

    bp_is_user_change_cover_image

    If I use this code it just echoes out the number 1

    ` <?php

    echo bp_displayed_user_use_cover_image_header()

    ?>`

    any help would be super thank!

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    Please use the code button when sharing code.

    Try:

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

    jameshh93
    Participant

    @jameshh93

    Great thank you! 🙂

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