-
Author
-
March 28, 2018 at 12:31 #193283farhadnikParticipant
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
March 28, 2018 at 17:13 #193315RaduModeratorWhich file did you had edited ?
There what page it’s ? It’s default /members directory frmo buddypres ? or any shortcode ?
Let me know
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 28, 2018 at 18:18 #193322farhadnikParticipantHi
/wp-content/themes/kleo/buddypress/members/members-loop.phpMarch 28, 2018 at 18:32 #193325RaduModeratorHi,
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.phpwill 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 solutionMarch 28, 2018 at 18:55 #193327farhadnikParticipantHi
I’ve added the code to the functions.php + deleted the code from members-loop.php
But it’s doesn’t workMarch 29, 2018 at 16:23 #193353RaduModeratorHi,
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 CODEfunction 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 solutionMarch 29, 2018 at 16:55 #193360farhadnikParticipantHi
Please check the attachment file.
Did I take the write parameter ?Attachments:
You must be logged in to view attached files.March 29, 2018 at 17:57 #193380RaduModeratorThe field name it’s “Full name in English”
In the guide it’s very good explained how you can do it
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 29, 2018 at 19:49 #193388farhadnikParticipantI’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
March 30, 2018 at 17:27 #193448RaduModeratorHi,
Just sent me your actually code that you run right now and it not works
cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 30, 2018 at 17:32 #193450farhadnikParticipantHi,
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’);April 4, 2018 at 15:03 #193771RaduModeratorHi,
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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 4, 2018 at 15:20 #193780farhadnikParticipantHi 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: yaelkurlander1and check the issue?
you can choose english version of the DB on the topMany Thanks
April 5, 2018 at 15:43 #193892RaduModeratorHi,
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' ); }
It works i’ve tested
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 5, 2018 at 17:01 #193910farhadnikParticipantHi,
It doesn’t work. You can see the action on this video:
https://drive.google.com/file/d/1ZQxixK4jTDmgl982wFgF3rMEBA72WUxX/viewTnx
April 5, 2018 at 18:59 #193922RaduModeratorThat’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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 5, 2018 at 19:13 #193924farhadnikParticipantAs you can see, I’ve switched off all plugins and it still doesn’t work
https://drive.google.com/file/d/1PduTx86HFMNfMC3hqPxL5dcTXDz1dfnk/view
April 5, 2018 at 19:58 #193930RaduModeratorI 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 solutionApril 5, 2018 at 20:05 #193931farhadnikParticipantI use this page: https://peoplelovepeople.co.il/our_hostess as a members page..
https://www.peoplelovepeople.co.il/wp-admin/admin.php?page=bp-page-settings
But it still doesn’t work
April 9, 2018 at 17:33 #194233farhadnikParticipantHi
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:
April 10, 2018 at 16:50 #194300RaduModeratorHi 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
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.