Support

Account

Home Forums Bug Reports Repeater on options page returns count Reply To: Repeater on options page returns count

  • Hi @ccernoch

    Thanks for the code. The issue here is that you are using the get_field function in the root of the functions.php file.

    The repeater field add-on is currently included during the init action. This action is run AFTER the functions.php file is read, so the issue you are seeing is that the repeater field is not yet loaded and can’t run it’s custom load_value logic.

    To solve the issue, please hook into the init action and run your get_field code there.

    
    add_action('init', function(){
    
    $hidden_users = get_field('hide-users', 'options'); 
    
    var_dump($hidden_users);
    
    });
    

    Thanks
    E