This topic has 4 replies, 4 voices, and was last updated 7 years by Abe.

  • Author
  • #741
     twoshoes
    Participant

    I need to change the minimum age of registration from 18 to 13. Could you please tell me where I can do so?

    #750
     SQadmin
    Keymaster

    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
    #763
     twoshoes
    Participant

    That seemed to help, thank you very much.

    #171605
     dirdy
    Participant

    Hello,
    we are having the same problem, but maybe due to the template updating, the code provided does not work. Is there any other solution?

    #171721
     Abe
    Keymaster

    Hi, those filters are BuddyPress specific and they should work unless BuddyPress changed something in their code.. which is unlikely

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?