Your address will show here +12 34 56 78

Home Forums WP ESTATE – Real Estate WordPress Theme FORUM Change Square Meters to m2

This topic contains 7 replies, has 2 voices, and was last updated by  Anna 3 years, 7 months ago.

  • Author
    Posts
  • #7734

    Anna
    Keymaster

    In the files where you want to show m2 look for $unit

    After $unit add this line

    = esc_html( get_option(‘wp_estate_measure_sys’, ”) );

    $unit=’m & sup2;’; (**remove the blank spaces)

    Then search for square add delete

    ‘.__(‘square’,’wpestate’).’

    Thank you

    • This topic was modified 3 years, 10 months ago by  Anna.
    • This topic was modified 3 years, 10 months ago by  Anna.
    • This topic was modified 3 years, 10 months ago by  Anna.
  • #7979

    Ksearch

    Hi Anna! I tried to apply this but all I get is a “b” instead of “square meters” after the number.

    This is how my “$unit” looks like:

    `$unit = esc_html( get_option(‘wp_estate_measure_sys’, ”) ); $unit=’m²’;

  • #8029

    Anna

    Hi Ksearch,

    It looks correct. I will need FTP access to look at the source code and advise on the cause.

    You can email the credentials at [email protected]

    Thank you
    Anna

  • #8052

    Ksearch

    Ok Anna, go it to work. It seems it was an apostrophe ( ’ vs ‘ ) and (” vs “) and spaces mistake:

    `esc_html( get_option(‘wp_estate_measure_sys’, ”) ); $unit=’m²’;

    I’m very new to WordPress and programming languages, so couldn’t figure it out before.

    Thanks for your attention!

    K.

  • #9260

    Pepe

    Hi Anna, can you tell me the “file name” .php where I can edit the code for “m2” ?

    I can´t fint it

    Thanks

  • #10446

    Anna
    Keymaster

    Hi Pepe,

    I posted the reply on Saturday, but it was not saved. Sorry for the delay.

    pages with “square” are:

    = compare-prop.php
    = single-estate_property.php
    = wpestate/libs/templates/front-end-submission.php

    Let me know if you need more help.

    Thank you
    Anna

  • #22690

    Michael

    Hello Anna,

    I purchased your theme a few days ago to build our new webpage with it. Of course, we have to to do a lot of adaptions like the here discussed. It took a bit of time before I found out how it works. To help others who want to adapt the same:

    Finally it worked with this string:

    esc_html ( get_option(‘wp_estate_measure_sys’, ”) );$unit=’m²’;

    There where a few ´ and ” instead of ‘

    I think in the next time I’ll have a lot of questions – ok, till later then. 😉

    Greetings

    Michael

  • #22800

    Anna
    Keymaster

    Hi Michael,

    Thank you very much for the email and for the tip. Will wait for your updates then regarding the other changes.

    Since you posted, I also wanted to update this forum. You can also use POEDIT to translate “square”, “feet” and “Meters” to a different kind of wording, even if the website is in English.

    here’s a post to help – http://wpestate.org/forums/topic/edit-labels-for-all-cities-all-states-all-listings-and-all-types-in-english/

    Thanks
    Anna

You must be logged in to reply to this topic.