Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi,
    Thank you for the post.

    The plugin does not deal with field labels. It only deals with the values.

    You are seeing theI do understand your need though. The problem is in the plugin we can not decide the edit/view context out of the box.

    There is a fielter

    
    bp_get_the_profile_field_name
    

    which can be used to show the different labels.
    A code like this should work

    
    
    add_filter( 'bp_get_the_profile_field_name', function ( $label ) {
    	global $field;
    	if ( ! $field || $field->type !== 'birthdate' ) {
    		return $label;
    	}
    
    	if ( bp_is_register_page() || is_admin() || bp_is_user_profile_edit() ) {
    		return $label;
    	}
    
    	return "Age";
    
    } );
    
    

    Regards
    Brajesh

    Thread Starter bmcconach

    (@bmcconach)

    Brajesh,

    Thank you so very much for your assistance! The code you provided gave me exactly the desired effect I was hoping to achieve. I couldn’t be more happy! Major kudos for an excellent plugin and support!

    Best regards!

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Thank you 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Birthdate/Age Text Display’ is closed to new replies.