-
Author
-
April 2, 2014 at 02:19 #14100JonbieParticipant
I am looking to add a single profile field I have created (Type of account) to the information displayed when on the members directory page (in users individual profile boxes, under there names).
I would also like to place the same field next to the users name on the top of there buddypress pages if possible?
I do not have enough knowledge to implement it myself as what i have researched hasn’t worked for me.
anyone have any experience of this?
April 2, 2014 at 04:42 #14108sharmstrModeratorDid you try this? http://bp-tricks.com/snippets/displaying-certain-profile-fields-on-your-members-profile-page/
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
April 2, 2014 at 05:00 #14111JonbieParticipantHi Sharmstr,
I actually spent the day trying to get that exact article to work for me but i just couldn’t get it.
maybe you could tell me if this looks right?
<div id=”item-buttons”>
<?php do_action( ‘bp_member_header_actions’ ); ?>
</div><!– #item-buttons –>
<?php
<div id=”member_profile”>
<div class=”profile_fields”>Category: <span><?php bp_profile_field_data( ‘field=Type of account’ );?></span></div>
</div>
do_action( ‘bp_profile_header_meta’ );?>
</div><!– #item-meta –>
April 2, 2014 at 05:23 #14113sharmstrModeratorLooks like you’re php is a screwed up. You can’t call html within the php tags.
Lets back up. Did you copy the file from the Kleo directory and put it in your child theme?
copy /Kleo/Buddypress/members/single/member-header.php
to /Kleo-child/Buddypress/members/single/member-header.phpon like 53 it tells you to add any additional profile fields there. So add the following on line 56 (you want it above the bp_profile_header_meta action call.
COPY CODE?> <div id='member_profile'> <div class='profile_fields'>Category: <span><?php bp_profile_field_data( 'field=Type of account' );?></span></div> </div> <?php
Works perfect for me.
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
April 2, 2014 at 05:36 #14115JonbieParticipantHey sharmstr,
Still no luck with that, the page i am trying to get that profile field to show up on is audiokulture.com/members ,
im not getting any errors but it still is not showing up?
April 2, 2014 at 05:53 #14116sharmstrModeratorWell that’s the wrong page. You said “I would also like to place the same field next to the users name on the top of there buddypress pages if possible?” and the link I sent you was about adding it to that page, so I was showing you how to do that. You can use the same code in kleo/buddypress/members/members-loop.php. Add it to line 69 (I didnt do this on purpose.)
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
April 2, 2014 at 05:57 #14117JonbieParticipantIm actually looking to add it to both places, and i confuse myself sometimes 😉
i will try that now.
April 2, 2014 at 06:17 #14118JonbieParticipantThe category title is coming up but not the type of account details, the field id is 5, i drop the ‘?
?>
<div id=’member_profile’>
<div class=’profile_fields’>Category: <span><?php bp_profile_field_data( field_id= 5 );?></span></div>
</div>
<?phpApril 2, 2014 at 06:30 #14121sharmstrModeratorIs that a question? I’m confused.
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
April 2, 2014 at 06:34 #14122JonbieParticipantsorry, badly worded.
As the field is not showing i was going to try using the id instead of the name. The id is 5 im just not 100% sure of code for it, is it (field_id= 5);?> or do i include the ‘
April 2, 2014 at 06:40 #14123sharmstrModeratorI know for sure it works with the field name. Something weird is going on over there. For the heck of it, have you tried a different field? That way you’d know if it was a field or code issue. Maybe…
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
April 2, 2014 at 06:55 #14124JonbieParticipantHey, yea i tried a few different fields but nothing is showing other than “Category”
April 2, 2014 at 14:44 #14141sharmstrModeratorWell, at this point, I dont think I can help without access to the site.
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
April 8, 2014 at 19:28 #14573JonbieParticipantHi Sharmstr,
I have finally found out what is happing with that code you sent me.
The category is visible when you are viewing your friends in the friends tab but not visible when searching members in the members directory.
any idea on why this is happening?
April 8, 2014 at 19:54 #14575sharmstrModeratorIf you read line 67 in members-loop it says you need to use bp_member_profile_data instead of bp_profile_field_data.
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
-
AuthorPosts
The topic ‘Adding 1 profile field to members directory’ is closed to new replies.