Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Show room number with comma or point (4.5)

This topic contains 1 reply, has 2 voices, and was last updated by  Anna 3 years ago.

  • Author
    Posts
  • #82860

    Nicole

    Hello Anna! I need to be able to show on the front end of the property list numbers like “4.5”

    For example, over here we use to say that a property has 4.5 rooms (which is essencially 4 rooms and 1 half). I notice that if i put 4.5 it doesn’t show anyting in the front list. There is any way to let the system show the 4.5 ???

    Thanks a lot!

  • #83559

    Anna
    Keymaster

    Hi Nicole

    Thank you for the message.

    You have to chance the number format in PHP.

    he intval need to be replaced to floatval on the lines you want to use float numbers like 3.5

    You’d have to change in all the locations which can be several and you’d have to do a search first in theme code by property_rooms

    in the end it should look like $property_rooms = floatval ( get_post_meta($post->ID, 'property_rooms', true) );

    Thank you,
    Anna

You must be logged in to reply to this topic.