Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • in reply to: Categories Member widget? #12917
     mrmalmgren
    Participant

    … would be great to do the same with the group widget if possible 🙂

    in reply to: Recently Active User Groups #12912
     mrmalmgren
    Participant

    thanks

    in reply to: Register if younger than 18 #12892
     mrmalmgren
    Participant

    sorry! Got it!

    Thanks for your help :)!

    in reply to: Recently Active User Groups #12879
     mrmalmgren
    Participant
    This reply has been set as private.
    in reply to: Register if younger than 18 #12878
     mrmalmgren
    Participant

    Hi,

    Added the code to the child, (see below), but it seems that the code is not accepted (it shows in the top of the admin area of wordpress)

    What am I doing wrong?

    Thanks

    <?php
    /**
    * @package WordPress
    * @subpackage Sweetdate
    * @author SeventhQueen <themesupport@seventhqueen.com>
    * @since Sweetdate 1.0
    */

    /**
    * Sweetdate Child Theme Functions
    * Add extra code or replace existing functions
    */

    ?>

    add_action(‘after_setup_theme’,’kleo_my_age’);
    function kleo_my_age()
    {
    remove_filter( ‘bp_get_the_profile_field_datebox’, ‘custom_bp_datebox’,10,7);
    add_filter( ‘bp_get_the_profile_field_datebox’, ‘my_age_range’,10,7);
    }

    /**
    * Filter year field only to allow minimum 18 year old members
    */
    function my_age_range($html, $type, $day, $month, $year, $field_id, $date) {
    $current_year = date(“Y”);
    $allowed_year = $current_year – 14;
    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;
    }

    in reply to: new matching setup #12458
     mrmalmgren
    Participant

    thanks!

    in reply to: new matching setup #12394
     mrmalmgren
    Participant

    think I got a lot working, but cant figure out this:

    would like to add a “hcp field”, acting like an “age field”. Looking for a… with the hcp between x and y.

    thanks 🙂

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

Log in with your credentials

Forgot your details?