Hey Etienne,
Here are the steps:
1) Create a custom field (“Custom 2” in this example)
2) Add this PHP to your functions.php for your theme:
function ru_custom_select( $field_attributes ) {
if ( isset( $field_attributes['custom2'] ) ) {
$field_attributes['custom2']['type'] = 'select';
$field_attributes['custom2']['meta'] = array( 'options' => array() );
// array ( LABEL, VALUE, IS PRESELECTED )
$field_attributes['custom2']['meta']['options'][] = array( 'First Option', 'First Option Value' , false );
$field_attributes['custom2']['meta']['options'][] = array( 'Second Option', 'Second Option Value' , false );
$field_attributes['custom2']['meta']['options'][] = array( 'Third Option', 'Third Option Value' , false );
}
return $field_attributes;
}
add_filter( 'rtec_fields_attributes', 'ru_custom_select', 10, 1 );
You can copy and paste the examples ($field_attributes[‘custom2’][‘meta’][‘options’][] = array( ‘First Option’, ‘First Option Value’ , false );) to create more options to select from as needed. If you are using a field other than “Custom 2” change “custom2” parts to match.
Let me know if you have more questions!
– Craig