Buonasera ho questa funzione wordpress che aggiunge il prezzo che viene inserito nel lato "amministratore" di Wordpress. Adesso vorrei aggiungere la possibilità di inserire o far apparire la scritta Trattativa Riservata quando non inserisco niente nel campo prezzo.
Questa è la funzione:
Codice PHP:
function property_price(){ global $post; $price = get_theme_currency(); $int_price = intval(get_post_meta($post->ID, 'locality_property_price', true));
if ( function_exists( 'ot_get_option' ) ) { $decimals = intval(ot_get_option( 'decimals')); $dec_point = ot_get_option( 'dec_point' ); $thousands_sep = ot_get_option( 'thousands_sep' ); $price .= number_format($int_price,$decimals, $dec_point, $thousands_sep); } else { $price = number_format($int_price); }
echo $price; }
Qualcuno sa darmi una mano
Grazie