rem_single_property_field_columns_frontend
This filter can be used to alter the number of columns of the field values on the Single Property Page.
Arguments
- Default CSS Classes
- Field Name (Field Data Name)
- Field [array]
- Property ID [integer]
Example #1
Suppose you want to change the Number of columns to 2, you will paste the following code in your theme’s functions.php file.
add_filter( 'rem_single_property_field_columns_frontend', 'rem_frontend_columns', 10, 4 ); function rem_frontend_columns($default, $field_key, $field, $property_id){ return 'col-sm-6'; }
Example #2
Suppose you want to display only Details section fields in 2 columns instead of 3, please paste the following code in the functions.php of theme/child theme.
add_filter( 'rem_single_property_field_columns_frontend', 'rem_2_column_fields', 50, 4 ); function rem_2_column_fields($class, $key, $field, $property_id){ if (isset($field['tab']) && $field['tab'] == 'general_settings') { return 'col-md-6 col-sm-12'; } else { return $class; } }
Example #3 (Property Features)
add_filter( 'rem_single_property_field_columns_frontend', 'rem_2_column_features', 50, 4 ); function rem_2_column_features($class, $key, $field, $property_id){ if ($key == 'property_features') { return 'col-md-6 col-sm-12'; } else { return $class; } }