How create corect function with this code?
<?php $price = get_post_meta($id, 'price_input', true);
if ($price != ''){
echo $price . " Euro";
}
else {
echo "None";
}
?>
I want to put this code in function.php or another place and use <?php myfunction(); ?>
Thx for answer!