• Joakim
    March 20, 2014 at 8:38 pm #27745

    Hi

    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.

    Regards
    Joakim

    Anna
    March 21, 2014 at 7:34 pm #27922

    Hi Joakim,

    I need team’s assistance on this. It’s a technical question. Will reply by Monday!

    Thank you
    Anna

    crerem
    March 24, 2014 at 12:46 pm #28328

    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) );

    or

    $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.

    Good luck

    Joakim
    March 24, 2014 at 1:05 pm #28330

    Thank you for the answer. The thing is that that in Sweden we only count rooms, not bedrooms.

    Best regards
    Joakim

    Joakim
    March 25, 2014 at 9:38 am #28499

    The custom fields worked great! Thanks!

    Regards
    Joakim

You must be logged in to reply to this topic.

'
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.