• roberton1973

    (@roberton1973)


    Hi.

    I was understanding that for have the slider it was necessary onl to put the metakey of Birth Date in the directory section, but if i do like that appearing only 2 fields from – to that they want to choose 2 exact dates instead of years. Maybe is because i have the yeas showing for the members, istead of the date of Birth?

    Just in case that there is to modify something this is the code in the functions PHP:

    function um_profile_field_filter_hook__custom_date( $value, $data ) {
    	if ( ! $value ) {
    		return '';
        }
        if ( um_is_core_page("user") ) {
            $format = empty( $data['format_custom'] ) ? $data['format'] : $data['format_custom'];
            $value = date_i18n( $format, strtotime( $value ) );
          	
    	}else{
    		$value = UM()->datetime()->get_age( $value );
        }
        
    	return $value;
    }
    add_filter( 'um_profile_field_filter_hook__date', 'um_profile_field_filter_hook__custom_date', 999, 2 );
    remove_filter( 'um_profile_field_filter_hook__date', 'um_profile_field_filter_hook__date', 99, 2 );

    It would be also nice if in The member card in the directory I could see some metas that i choose on one line, For Example: Name Age Gender (put in this way Roberto 48 – Male).

    Thanks and regard

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Age slider does not appear’ is closed to new replies.