Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to show profile fields as links (in member-loop.php)


  • israel4lincelot
    Participant

    @israel4lincelot

    Hi!

    I’m trying to figure something out. So in my profile single page the profile field is shown as a link that takes you to a handy search view with al the profiles with that same profile field.

    Now I want to implement this on my members-loop.php with:
    bp_member_profile_data( 'field=the field name' );

    Sadly this displays it only as a paragraph and I would really like it to be displayed as links.

    Is this even possible?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    You need to put this in an anchor <a></a> tag, maybe the profile having only text value and link to that should be written by yourself.

    Thanks


    israel4lincelot
    Participant

    @israel4lincelot

    Hi!

    Where can I find the function that creates the URL link from the giving field?

    So what I mean is that in the file profile-loop.php the Field is loaded as a link just by adding <dd><?php bp_the_profile_field_value(); ?></dd> to it.

    This outputs the following code in my webpage <dd><p>Change Control</p></dd>

    So I’m wondering where this output is being set? If I have that I can hopefully add it to my members-loop.php

    Thx!


    Prashant Singh
    Participant

    @prashantvatsh


    israel4lincelot
    Participant

    @israel4lincelot

    Not really the issue. My field type gets printed without problem.

    I just would like them to have the same output as the profile-loop.php provides. So the link that redirects you to the Search page that shows all the people with the same field type.

    This function bp_the_profile_field_value() should have some code written to build that URL link.

    Thx!


    Prashant Singh
    Participant

    @prashantvatsh

    I think you can put an anchor tag yourself with the href attribute and then echo this value.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar