Hi
Add this to sweetdate-child/functions.php to in the remov actions function:
remove_filter( ‘bp_get_the_profile_field_datebox’, ‘custom_bp_datebox’,10,7);
Then, bellow add this:
COPY CODE
function my_custom_bp_datebox($html, $type, $day, $month, $year, $field_id, $date) {
$current_year = date("Y");
$allowed_year = $current_year - 13;
if($type == 'year'){
$html = '<option value=""' . selected( $year, '', false ) . '>----</option>';
for ( $i = $allowed_year; $i >= 1920; $i-- ) {
$html .= '<option value="' . $i .'"' . selected( $year, $i, false ) . '>' . $i . '</option>';
}
}
return $html;
}
add_filter( 'bp_get_the_profile_field_datebox', 'my_custom_bp_datebox',10,7);
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution