This topic has 9 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #101791
     Ayoade
    Participant

    In the members’ page (https://afrimash.com/members/), I see the members’ last update after their names; but I will like to have some members’ data there instead.

    Please see the attached picture for what I have in mind.

    Earlier @shamr gave me the code to have some profile info on the members’ profile picture. I will like to have thesame info below members’ name in the members’ directory.

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #101902
     Radu
    Moderator

    Hi,

    Please provide the code that sharmstr has provided to you to take a look

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #102148
     Ayoade
    Participant

    He gave me the following instruction:

    You can hide the activity with this css

    #item-header #latest-update {
    display: none;
    }

    And you can add profile fields data with this. Put it in your child theme’s functions.php file.

    add_action( ‘bp_profile_header_meta’, ‘display_user_info’ );
    function display_user_info() {
    echo “Field Name Here: ” . bp_profile_field_data(‘field=Field Name Here’);
    echo “</br>”;
    echo “Another Field Name Here: “. bp_profile_field_data(‘field=Another Field Name Here’);
    }

    That was under this topic – https://archived.seventhqueen.com/forums/topic/can-i-use-a-different-title-on-buddypress-profile-picture-instead-of-activity-see-attached-picture

    #102176
     Radu
    Moderator

    Sorry, please provide ftp…

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #102180
     Ayoade
    Participant
    This reply has been set as private.
    #102196
     Radu
    Moderator

    Done

    Add this css to kleo-child/style.css

    COPY CODE
    
    .dir-list span.update {
        display: none !important;
    }
    
    .dir-list .update.show {
        text-align: center !important;
    }
    

    I’ve used this function

    COPY CODE
    
    add_action( 'bp_directory_members_item', 'display_user_info_member_dir' );
    function display_user_info_member_dir() {
    echo '<div class="update show">';
    $userid = bp_get_member_user_id();
    
        echo "" . bp_profile_field_data('field=Full Name&user_id='.$userid);
        echo "</br>";
        echo "| ". bp_profile_field_data('field=Professional Title&user_id='.$userid);echo ", ". bp_profile_field_data('field=Location&user_id='.$userid);echo "". bp_profile_field_data('field=Country&user_id='.$userid);
        echo "</br>";
        echo " @ ". bp_profile_field_data('field=Position&user_id='.$userid);echo "". bp_profile_field_data('field=Working at&user_id='.$userid);
    }
    echo '</div>';
    

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #102223
     Ayoade
    Participant

    Great job Radu!

    However, I noticed a new problem …not sure if it’s related…

    When I update any page in my dashboard, I get an error (see attached picture) …ultimately, the page updates but returns this error.

    Please help me.

    Attachments:
    You must be logged in to view attached files.
    #102313
     Radu
    Moderator

    Hi,

    It’s done please test it issue was caused by this echo ‘‘; that has placed outside the function 🙁 now is ok

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #102365
     Ayoade
    Participant

    Nice job Radu! Everything is working fine now.

    #102678
     Radu
    Moderator

    Great,

    Have a nice week

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?