Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to modify this code? for php writers


  • residentcusano
    Member

    @residentcusano

    /***
    * 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

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

  • deadlyhifi
    Participant

    @tomdebruin

    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.


    residentcusano
    Member

    @residentcusano

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to modify this code? for php writers’ is closed to new replies.
Skip to toolbar