Skip to:
Content
Pages
Categories
Search
Top
Bottom

put a notice to top of the profile (edit photo)


  • HDcms
    Participant

    @hdcms

    Hello,

    I want to put a notice to help members enter AND save their data at the top of the profile.
    https://screenshots.firefox.com/tzvUPLhu4rtQFBrX/null

    add_action( ‘bp_before_activity_post_form’, ‘afficheMsg’ );
    function afficheMsg() {
    …
    echo “hello” ;
    }

    works all the time, how to just display it for profile editing or photo change ?

    Regards

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

  • Shashi Kumar
    Participant

    @mastershas

    Hi @hdcms
    You can achieve the following by following code

    
    add_action( 'bp_before_member_header', 'afficheMsg' );
    function afficheMsg() {
    if ( bp_is_user_profile_edit())
    echo "Hello";
    }

    If you have any further question kindly ask.


    Shashi Kumar
    Participant

    @mastershas

    Hi @ hdcms
    I did not see the picture before suggesting the code and misunderstood. You can use the actions like bp_before_profile_edit_content and bp_before_profile_avatar_upload_content in place of bp_before _member_header. The better way to edit the appearance of a website is by the adding the buddypress template files in your theme. Here is a beautiful article on this.


    HDcms
    Participant

    @hdcms

    Hello
    with the good action names, it works 🙂
    Thank you


    Shashi Kumar
    Participant

    @mastershas

    Hi @hdcms
    I am happy that I could help you.

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