• I’ve added a custom post type field using this field, and if I try including the field in a template file like this:

    <?php bp_member_profile_data( 'field=Favorite Pic' ); ?>

    It returns the Post ID number of the custom post type. How would I access one of the fields in the CPT?

    For example, one of my custom fields tied to the Custom Post Type is an image field called ‘favorite_pic.’ How could I pull that image in when someone select that CPT post in their profile?

    Thanks anyone!

    https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/

Viewing 1 replies (of 1 total)
  • you can use the following

    xprofile_get_field_data( ‘Field name’, bp_get_member_user_id());

    also don’t forget to set the value for the user in the profile admin setting ..

Viewing 1 replies (of 1 total)
  • The topic ‘How to display field from custom post type?’ is closed to new replies.