Home › Forums › WP ESTATE – Real Estate WordPress Theme FORUM › Change property_bedrooms
This topic contains 4 replies, has 2 voices, and was last updated by Joakim 3 years, 6 months ago.
Sorry for the huge amounts of questions…
Is there a way to change property_bedrooms to, instead of only allowing numbers, a free text field.
I have changed property_bedrooms to be the Object-ID and if the ID is 513-DD it only displays 513.
I hope you know what i mean.
I need team’s assistance on this. It’s a technical question. Will reply by Monday!
The property_bedrooms is forced by the system to be a integer number. If you change this the search results that involve bedrooms will not work corectly.
If you still want to change this to the text format you should search in the theme folder for all occurences of property_bedrooms and where you see
$property_bedrooms = floatval ( get_post_meta($post->ID, ‘property_bedrooms’, true) );
$property_bedrooms = intval ( get_post_meta($edit_id, ‘property_bedrooms’, true) );
replace intval or floatval with esc_html
Also i suggest to consider using a custom field rather than doing this change.
Before doing any change make a backup – just in case things not work well.
Thank you for the answer. The thing is that that in Sweden we only count rooms, not bedrooms.
The custom fields worked great! Thanks!
You must be logged in to reply to this topic.