-
Author
-
January 21, 2015 at 20:59 #42960diamondbyboldParticipant
Hi,
I want to add more information of the users directly in the members box of the members list. (exemple in attachments)
Any idea how can I do that?Thanks
Attachments:
You must be logged in to view attached files.January 21, 2015 at 21:36 #42963LauraModeratorHello, you can use this code:
COPY CODEadd_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', 'Country', 'City' ); }
Add it inside functions.php in child theme
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
January 23, 2015 at 14:41 #43188diamondbyboldParticipantThanks Laura, could you please explain the code a little better?
In the $kleo_config[‘bp_members_details_field’] = ‘About Me’; line I should change the “About Me” to the name of the fields group that in my case is “Geral”?
In the $kleo_config[‘bp_members_loop_meta’] = array line I should put the names of the fields of that group like Username, Nationality, Height, Weight, etc. in the array?I tried that without success.
Thanks
January 23, 2015 at 17:36 #43221LauraModeratorHello, “About Me is the name of the field that you want to show under the name like for example “I’m a single girl from London” or maybe you want to put there “Music” To show “Rock,Pop…”
Then the ‘I am a’ , ‘City’ etc… Are the fields that appear next to the aye ( 20 / Woman / London) Just change About me with the field you want to add, and City, I am a etc with the other fields you want.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
January 23, 2015 at 20:20 #43243diamondbyboldParticipantSo, if I understand, those fields are static.
There’s any way I can get the content of specific fields I have created through the “Advance Profiles” component of Buddypress?January 24, 2015 at 06:07 #43297LauraModeratorHello, in Users > Profile fields , all of those fields can be used with the code, you just have to change the code name with the field name
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
January 30, 2015 at 20:17 #44160diamondbyboldParticipantI add the next code to functions.php:
COPY CODEadd_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'] = 'Geral'; //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( 'Username', 'Nome', 'Apelido' ); }
You can see in the print attached that I have those camps in Profile Fields but the Memebers box don’t show any of them.
Attachments:
You must be logged in to view attached files.January 31, 2015 at 03:10 #44197LauraModeratorHello, Geral is not a field, is the group, Geral need to be changed to a name of a field, like “About Me”, a field that has long text.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 13, 2015 at 03:08 #45938fher012ParticipantI think I am having the exact same challenge. Below is the code snippet that I have included in the child function.php. I also cleared the cache as I saw reference to doing that somewhere else. Can I confirm if I am doing this correctly? I have tried various combinations of using field name or field groups, so not sure if something else is the issue.
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(
‘Favorite Quote’
);
}Attachments:
You must be logged in to view attached files.February 13, 2015 at 10:37 #45967LauraModeratorHello, can you share your ftp and website so i can check it out?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 13, 2015 at 17:06 #46015diamondbyboldParticipantPlease share the problem when you find it, I also can’t show the fields.
February 15, 2015 at 01:55 #46114troy7890ParticipantNot working for me either –
Does the member details field need to be the field id name?
$kleo_config['bp_members_details_field'] = 'Favorite Game Character?';
Or
$kleo_config['bp_members_details_field'] = 'field_112';
February 15, 2015 at 07:14 #46141LauraModeratorHello, the name should match as it shows in profile fields
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 15, 2015 at 09:38 #46154troy7890ParticipantHmm, that’s what I have now.
http://boardgamersleague.com/player-info/members/
Attachments:
You must be logged in to view attached files.February 15, 2015 at 09:44 #46156troy7890ParticipantSorry – wrong photo screenshot uploaded.
From the link above you’ll see that the only profile fields that are loading are the item title and the itme meta “activity”.Thanks for your help.
This will be a nice addition to a great community theme.Attachments:
You must be logged in to view attached files.February 17, 2015 at 15:26 #46382LauraModeratorHello, in the 114 line you dont have a ? after character, as your field shows
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 18, 2015 at 21:12 #46614troy7890ParticipantJust a public comment that adding the ? to the line had no effect on getting the fields to display.
February 20, 2015 at 00:08 #46796AndreiModeratorHi, please let us your ftp credentials so we can give a look at what’s wrong in your code.
Remind to set the reply as private.Thanks.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 20, 2015 at 00:17 #46802sharmstrModerator@troy7890 you forgot to put the add_action line. Merely adding the function but not calling the function wont do anything. Look at the code again in the first post.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 00:33 #46811troy7890ParticipantThank you sharmstr. My bad, apparently my hand didn’t copy the first line (which is overlapped when you select the code BTW). Totally my bad.
However, after adding that action and flushing the cache, still nothing changed on my members page. Weird.
February 20, 2015 at 00:51 #46821sharmstrModeratorI feel like the above code is for sweetdate. Try this instead.
COPY CODEadd_action( 'bp_profile_header_meta', 'display_user_info' ); function display_user_info() { bp_profile_field_data('field=Favorite Game Character?'); echo "</br>"; bp_profile_field_data('field=City'); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 01:05 #46825troy7890ParticipantThanks, but even with that new code, we still got nothin.
February 20, 2015 at 01:13 #46826sharmstrModeratorHuh? I see it.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 01:16 #46827sharmstrModeratorAlso, if you want to add the field name before it, change it to this
COPY CODEadd_action( 'bp_profile_header_meta', 'display_user_info' ); function display_user_info() { echo "Favorite Game Character?: " . bp_profile_field_data('field=Favorite Game Character?'); echo "</br>"; echo "City: ". bp_profile_field_data('field=City'); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 01:17 #46828sharmstrModeratorI’m an idiot. I was thinking the member profile. Please hold.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 01:21 #46829sharmstrModeratorTry this instead
COPY CODEadd_action( 'bp_directory_members_item', 'display_user_info' ); function display_user_info() { echo "Favorite Game Character?: " . bp_profile_field_data('field=Favorite Game Character?'); echo "</br>"; echo "City: ". bp_profile_field_data('field=City'); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
February 20, 2015 at 02:17 #46838troy7890ParticipantThanks so much sharmstr.
So we’re getting really close to doing what the original topic of this thread requested. Here’s what my page looks like now – You’ll see that the field titles are displaying from the function, but not the field data.
http://boardgamersleague.com/player-info/members/Using your bp_profile_header_meta that you posted, I’m able to get that to work on the member profile page fine. But for some odd reason, the field data is displaying before the field title. (see attached)
We’re getting close! Thanks!
Attachments:
You must be logged in to view attached files.February 20, 2015 at 15:44 #46875sharmstrModeratorI forgot to change another bit of the code when I copied it over. Sorry. Try this
COPY CODEadd_action( 'bp_directory_members_item', 'display_user_info' ); function display_user_info() { echo "Favorite Game Character?: "; bp_member_profile_data('field=Favorite Game Character?'); echo "</br>"; echo "City: "; bp_member_profile_data('field=City'); }
and some css to center it.
COPY CODE#buddypress #members-list div.item { text-align: center; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
Attachments:
You must be logged in to view attached files. -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.