Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor MariaKravchenko

    (@mariakravchenko)

    Hello.

    That you for pointing us to this issue. We will try to improve this as soon as possible.

    Regards.

    Thread Starter InventiveWebDesign

    (@inventivewebdesign)

    The problem is that my client’s website currently looks terrible because there are commas in the years. Could you please talk to your developers and supply a solution ASAP? Previous programmers have customized your plugin and I can’t do updates because it destroys everything that has been done. I just need the ability to remove the comma from the years.

    Thread Starter InventiveWebDesign

    (@inventivewebdesign)

    There should be a way to have it strip the comma from the code in the files that you have in the software I just need to know how and where.

    Something like this: number_format($year, 0, ‘.’, ”);

    I just need to know how to change the php code for the year variable with this.

    Plugin Contributor Maxim Peshkov

    (@maximpeshkov)

    Hello,

    you could add the following code to your functions.php in theme’s root directory:

    function ignore_format_of_year_built() {
      if( has_action( 'wpp_stat_filter_year_built', array( 'WPP_F', 'format_numeric' ) ) ) {
        remove_action( 'wpp_stat_filter_year_built', array( 'WPP_F', 'format_numeric' ) );
      }
    }
    add_action( 'template_redirect', 'ignore_format_of_year_built' );

    Just replace filter wpp_stat_filter_year_built above if needed. year_built is slug of your year attribute. So, e.g., if slug is year, filter should be called wpp_stat_filter_year.

    Regards.

    Thread Starter InventiveWebDesign

    (@inventivewebdesign)

    Looks like that worked, thanks!

    Plugin Contributor Maxim Peshkov

    (@maximpeshkov)

    Please, mark the ticket as resolved.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Remove comma from Numeric Variable’ is closed to new replies.