Hi! Try add the following code using the Functionality plugin:
add_filter( 'recipe_hero_meta_ingredients_amount', 'rhs_add_new_amount' );
function rhs_add_new_amount( $amounts ) {
$amounts['dl'] = 'Deciliter';
}
Hi Bryce!
When adding this line with the Functionality plugin all measurement options dissappear. The dropdown has no values to choose from.
Can you please post a working method of adding custom measurements, as this is crucial for europen sites.
Not a permanent fix (will be lost when updating)
You could try:
Backup Copy of \recipe-hero\includes\rh-fields.php
Go In:
\recipe-hero\includes\rh-fields.php
Find
‘ml’ => __( ‘Milliliter (ml)’, ‘recipe-hero’ ),
‘ts’ => __( ‘Teaspoon’, ‘recipe-hero’ ),
Replace with:
‘ml’ => __( ‘Milliliter (ml)’, ‘recipe-hero’ ),
‘dl’ => __( ‘Deciliter (dl)’, ‘recipe-hero’ ),
‘ts’ => __( ‘Teaspoon’, ‘recipe-hero’ ),
Save
Upload
Refresh
Hopefully they add it and other measurements to the future releases.
Sorry, I made a mistake before. The code should be:
add_filter( 'recipe_hero_meta_ingredients_amount', 'rhs_add_new_amount' );
function rhs_add_new_amount( $amounts ) {
$amounts['dl'] = 'Deciliter';
return $amounts;
}