Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Creating & Extending

Existing and new plugins/components and themes.

How to modify this code? for php writers (3 posts)

Started 1 year, 4 months ago by: residentcusano

  • Profile picture of residentcusano residentcusano said 1 year, 4 months ago:

    /***
    * If you want to show specific profile fields here you can,
    * but it’ll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( ‘field=the field name’ );
    */

    ………………………………………………………………………………………………………………………………………

    The field i wanna show is named Travelling’ s datas
    so i did:

    bp_member_profile_data( ‘field=Travelling’ s datas’ )

    BUT I HAVE AN ERROR and i can t see nothing only an error writing

  • Profile picture of Tom(dB) Tom(dB) said 1 year, 4 months ago:

    What’s the error? Most likely the apostrophe is causing the error, try escaping it with a slash

    bp_member_profile_data( 'field=Travelling’ s datas' )

    the forward slash isn’t showing up in the code, but place it just before the apostrophe.

  • Profile picture of residentcusano residentcusano said 1 year, 4 months ago:

    I had this :

    Parse error: syntax error, unexpected ‘=’ in /web/htdocs/www.erasmusandisep.com/home/wp-content/plugins/buddypress/bp-themes/bp-default/members/members-loop.php on line 45