This topic has 20 replies, 2 voices, and was last updated 7 years by Radu.

  • Author
  • #193283
     farhadnik
    Participant

    Hello,
    I use your theme in this website: https://www.peoplelovepeople.co.il
    On this page: https://www.peoplelovepeople.co.il/en/our_hostess -> members loop, I’m trying to insert this tag “bp_get_profile_field_data”, but this doesn’t work. The template doesn’t  display my tag.

    Please help.

    Many Thanks

    #193315
     Radu
    Moderator

    Which file did you had edited ?

    There what page it’s ? It’s default /members directory frmo buddypres ? or any shortcode ?

    Let me know

    Cheers
    R

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

    Hi
    /wp-content/themes/kleo/buddypress/members/members-loop.php

    #193325
     Radu
    Moderator

    Hi,

    The file path it’s ok but if you want to edit to be update proof files from parent can be copied to the child in same path

    example :
    /wp-content/themes/kleo/buddypress/members/members-loop.php

    will be overwritten by this

    /wp-content/themes/kleo-child/buddypress/members/members-loop.php

    In case you want to pull some profile info into directory follow this https://archived.seventhqueen.com/kleo/article/add-extra-profile-fields-show-certain-profile-fields-member-directory

    Cheers

    R

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

    Hi
    I’ve added the code to the functions.php + deleted the code from members-loop.php
    But it’s doesn’t work

    #193353
     Radu
    Moderator

    Hi,

    It works for me

    i just have pasted that snippet into child then i’ve created two fields location and specialization to test..

    Make sure to have identically the field names in the code and in the wp admin -> user -> profile fields.

    COPY CODE
    
    
    function sq7_extra_fields_members_directory() {
    
        $location = bp_get_member_profile_data('field=Location');
        $specialization = bp_get_member_profile_data('field=Specialization');
    
        if ($specialization || $location) {
            echo '<div class="mdetcenter">'. 'Location : ' . $location . '</div>';
            echo '<div class="mdetcenter">'. 'Specialization : ' . $specialization . '</div>';
        }
    
    }
    add_action('bp_directory_members_item', 'sq7_extra_fields_members_directory');
    

    Cheers
    R.

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

    Hi
    Please check the attachment file.
    Did I take the write parameter ?

    #193380
     Radu
    Moderator

    The field name it’s “Full name in English”

    In the guide it’s very good explained how you can do it

    Cheers
    R

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

    I’ve inserted the code you sent me, but it doesn’t work.
    Can I send you the DB username and password, and you will check the issue?

    Tnx

    #193448
     Radu
    Moderator

    Hi,

    Just sent me your actually code that you run right now and it not works

    cheers
    R

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

    Hi,
    function sq7_extra_fields_members_directory() {

    $location = bp_get_member_profile_data(‘field=Full name in English’);
    $specialization = bp_get_member_profile_data(‘field=City’);

    if ($specialization || $location) {
    echo ‘

    ‘. ‘Location : ‘ . $location . ‘

    ‘;
    echo ‘

    ‘. ‘Specialization : ‘ . $specialization . ‘

    ‘;
    }

    }
    add_action(‘bp_directory_members_item’, ‘sq7_extra_fields_members_directory’);

    #193771
     Radu
    Moderator

    Hi,

    It looks ok it should work, on my local install it works as it should.

    Pay attention again to the filed name, if still not works disable all plugins except buddypress and check again…tried to login to take a look at the filed names and it says invalid login

    Cheers
    R

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

    Hi Radu,
    I just wont to close this issue.
    Can you please login to the DB with this:
    https://www.peoplelovepeople.co.il/wp-admin
    username: admin
    password: yaelkurlander1

    and check the issue?
    you can choose english version of the DB on the top

    Many Thanks

    #193892
     Radu
    Moderator

    Hi,
    Replace that snippet with this one…

    COPY CODE
    
    //members page fields
    add_action('after_setup_theme','kleo_my_member_data');
    function kleo_my_member_data()
    {
        global $kleo_config;
    //this is the details field, right now it take the "About me" field content
        $kleo_config['bp_members_details_field'] = 'About me';
    //this display the fields under the name, eq: 36 / Woman / Divorced / Berlin. Modify with the names of the fields you want to appear there
        $kleo_config['bp_members_loop_meta'] = array(
            'I am a',
            'Marital status',
            'City'
        );
    
    }
    

    https://archived.seventhqueen.com/sweetdate/article/add-profile-information-member-name-members-directory

    It works i’ve tested

    Cheers
    R

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

    Hi,
    It doesn’t work. You can see the action on this video:
    https://drive.google.com/file/d/1ZQxixK4jTDmgl982wFgF3rMEBA72WUxX/view

    Tnx

    #193922
     Radu
    Moderator

    That’s wired cuz on my local install it works, i see there you have some stars, review stars ? how they are added there ? try to switch off all plugins and check if it works.

    So the code it’s like plug and play it’s tested multiple times

    Cheers
    R

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

    As you can see, I’ve switched off all plugins and it still doesn’t work

    https://drive.google.com/file/d/1PduTx86HFMNfMC3hqPxL5dcTXDz1dfnk/view

    #193930
     Radu
    Moderator

    I see..

    The reason that not works it’s because you don’t use the members directory page, this solution : https://archived.seventhqueen.com/forums/topic/profile-field-title/#post-193353 will works the directory.

    So revert from the last code to this one : https://archived.seventhqueen.com/forums/topic/profile-field-title/#post-193353

    create a new page named hostes and assign it there on the members page,

    IT should work

    Cheers
    R.

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

    Hi
    I’ve added this function:
    add_action( ‘bp_profile_header_meta’, ‘display_user_color_pref’ );
    function display_user_color_pref() {
    $args = array(
    ‘field’ => ‘Full Name in English’, // Field name or ID.
    );
    $favorite_color = bp_get_profile_field_data( $args );

    if ($favorite_color) {
    echo $favorite_color;
    }

    }

    and it works perfectly in members profile page:

    https://peoplelovepeople.co.il/our_hostess/hanna-yupa

    #194300
     Radu
    Moderator

    Hi again

    Not sure why not works on you i’ve tested that code multiple times and it works for me, so make sure to set members page from here https://www.peoplelovepeople.co.il/wp-admin/admin.php?page=bp-page-settings, then de-activate all plugins and the child theme, empty/purge cache.

    Then add that code in the bp-custom.php file if the child will be de-activated.

    bp-custom.php does not exist by default. If you don’t have a file located at /wp-content/plugins/bp-custom.php, go ahead and create a blank file in that you will paste this snippet : https://archived.seventhqueen.com/forums/topic/profile-field-title#post-193353

    So it’s essential to follow exact steps cuz the issue most sure it’s caused by some plugin or child modification

    Cheers
    R

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

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

Log in with your credentials

Forgot your details?