Custom field from BuddyPress Extended Profile
-
Hi There,
So I have extended field with a unique ID number. I need to show this number on a Learndash Certificate.
I have tried this solution
add_shortcode( 'xprofile_field_data', function ( $atts = array(), $content = '' ) { $atts = shortcode_atts( array( 'field' => '', 'user_id' => get_current_user_id(), ), $atts ); if ( empty( $atts['field'] ) ) { return ''; } return xprofile_get_field_data( $atts['field'], $atts['user_id'], 'comma' ); } );
Then using a shortcode [bp_xprofile_field_data field=3] to pull in that Field value but its not working.
Any advice how to pull in a specific field value to display on learndash Certificates?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom field from BuddyPress Extended Profile’ is closed to new replies.