• Resolved computermobil

    (@computermobil)


    Hi friends.
    I was searching in template files and others but could not find a solution fpr this.
    Is there any chance to add a space between the currency, for example CHF and price?
    In the end it should look like for example CHF 800,00
    but now it shows CHF800,00

    Thank you very much in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    yes, it is possible, the best way to do that is to use adverts_currency_list filter, you can add the code below in your theme functions.php file it will add a space between currency name and value.

    
    add_filter( "adverts_currency_list", function( $clist ) {
      foreach( $clist as $k => $c ) {
        if( $c["code"] == "CHF" ) {
          $clist[$k]["sign"] = "CHF ";
        }
      } 
      return $clist;
    } );
    
    Thread Starter computermobil

    (@computermobil)

    Hi Greg!
    Thank you for your quick response.
    I tested the code above in my custon functions, but there must be a small mistake in there cause it breaks the site.
    Maybe an idea what it is? Cause i am not really a coder ……
    Thank you very much again for looking after me.

    Thread Starter computermobil

    (@computermobil)

    Hello again Graig!

    Well, i tried again and added the code to the functions php in child theme.
    Now it works!
    Very happy about that and thank you very much again!
    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Space between currency and price’ is closed to new replies.