Support Forum
Hello,
I'm using ACF but I change to your plugin.
In a select, I want to select the groups of buddypress.
In ACF I do this to get the groups:
function dynamic_grupo_dropdown ( $field ){
global $wpdb;
$table = $wpdb->prefix."bp_groups";
$grupos = $wpdb->get_results( "SELECT id,name FROM $table" );
if(!empty($grupos)){
foreach($grupos as $grupo){
$field['choices'][$grupo->id] = $grupo->name;
}
}
return $field;
}
add_filter('acf/load_field/key=key_post_grupos_acceso', 'dynamic_grupo_dropdown');
But don't know how can do this with yours plugin...
Can you help me?
Thanks.