Skip to:
Content
Pages
Categories
Search
Top
Bottom

php “placeholders”?

  • Avatar of Sparksdontflyup
    Sparksdontflyup
    Participant

    @sparksdontflyup

    Is there a list of php “placeholders”? Like

    <?php bp_wire_post_author_name() ?> for getting things like custom profile feilds.

    For example, if I wanted to get the users value from a Custom Profile Feild called “Religion”(where the user would put in there religion), how would I do this?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    <?php echo xprofile_get_field_data( $field_name, $user_id ); ?>

    Avatar of Sparksdontflyup
    Sparksdontflyup
    Participant

    @sparksdontflyup

    Okay, so I would edit feild_name and user_id or just feild_name? and how would I get the users full name or just first name? Would I use something like:

    <?php echo xprofile_get_field_data( $full_name, $user_id ); ?>

    and for the first name:

    <?php echo xprofile_get_field_data( $full_name-first, $user_id ); ?>

    or what. Would I have to create 2 separate fields for first name and anither for their last and use something like:

    <?php echo xprofile_get_field_data( $first_name, $user_id ); ?>

    or what?

    Thanks.

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

You must be logged in to reply to this topic.