Hello there,
Thank you for your reply. I’ve tried it, and I still get the same “0” displayed by default if the field is empty.
I think it is because displaying this 0 is embeded in the functions of the theme, but it is in the same field as the formatting for the numbers.
This is what I have in my functions-theme.php file:
/*-----------------------------------------------------------------------------------*/
/* Listing Price */
/*-----------------------------------------------------------------------------------*/
function listing_price() {
global $post;
$price_meta = get_post_meta(get_the_ID(), '_ct_price', true);
$price_meta= preg_replace('/[\$,]/', '', $price_meta);
echo number_format($price_meta, 0, ',', '.');
}