Skip to:
Content
Pages
Categories
Search
Top
Bottom

show custom field in bp_group_the_member loop

  • Hi All,
    I’ve created a custom profile field called company name. What I’m trying to do, is alter the groups/singles/members.php file to show this next to the default field. However, it won’t show. I normally use this to show any custom fields I’ve created
    `

    `
    So within the loop:

    I’ve got this:
    `
    <a href="”>

    `
    However, it doesn’t display the field. Any ideas?
    TIA

Viewing 10 replies - 1 through 10 (of 10 total)
  • Shouldn’t need to have to perform a while loop in a members loop, it should be much easier than that
    bp_member_profile_data(‘field=Company Name’)

    if(bp_get_member_profile_data( ‘field=Company Name’ ) == ’special’)

    Something along those lines. Over the last day or two there have been a few posts on the subject of profiles, and all the info one could need is to be read in these so have a scroll back over the last 3 or so pages of posts – in fact one post was about not having to create while loops, an old post but resurfaced.

    hi hnla, the while loop is already part of the file, it’s within the groups dir not the members dir, just incase this makes a difference?
    I’m also a bit puzzled by your code, all I wish to do is display the value of my field, your code looks like it says if it equals? Perhaps I’m wrong?
    TIA

    Yep sorry misunderstood or didn’t read carefully enough the mention of ‘group’

    If you haven’t got there yet this works for me on the members view in groups/single/members.php:

    Hi hnla, thanks for the reply, after a slight bit of tweaking, I found this worked:
    `<a href="”>

    `
    Cheers again

    Cool, yes it was the ‘group’ in bp_get_group_member_id() that foxed me for a while.
    considering both snippets work to the same effect, do you consider one over the other to be preferable?

    Hi hnla, I personally like the way I’ve written it, I find it far easier to maintain the code and helps me be consistent throughout

    Fair point, consistency is good :)


    ultimateuser
    Participant

    @ultimateuser

    @jarvo1980
    @hnla

    Great tutorial! Got it working!

    Anyone know how to remove remove the automatic links in these fields?

    It’s been discussed often there is a means, can’t recall if a plugin, no links to hand I’m afraid but have a hunt through the archives for posts on the subject.


    ultimateuser
    Participant

    @ultimateuser

    @hnla

    I think you are referring to the Custom Profile Filters for BuddyPress plugin (https://wordpress.org/extend/plugins/custom-profile-filters-for-buddypress/installation/)

    I had this installed already and works perfectly in the members-loop. But it doesnt apply it to the bp_group_the_member loop

    The automatic links still show up…

    So this is where I’m getting stuck…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘show custom field in bp_group_the_member loop’ is closed to new replies.
Skip to toolbar