wordpress - How to customize this theme's ingredient amount/quantity? -


i purchased , installed this theme on themeforest.

the author said going solve issue in next upgrade of theme 1 month ago.

i not want wait him need on own.

my problem is: amount of ingredients ends double digit ".00" example, if type 6 grams, looks 6.00 grams , it's pretty annoying.

do have idea how change it?

you can try "hack"

echo 6.00 + 0; // echos 6 

or proper way , this

$val = floatval(6.00); 

change line

echo "<dt>" . $ingredient_result->amount . " $unit_name</dt>"; 

with this

echo "<dt>" . floatval($ingredient_result->amount) . " $unit_name</dt>"; 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -