php - Replacing the price tag "0.00" with "Call" -
am trying replace price tag has default price of "0.00" "call".they asked me insert code on line of code below. code below code in functions.php page.
function get_listing_price(){ if(get_field("price_layout","options") == "right"){ echo number_format(get_field("price"), 2, '.', ',')." "; } echo the_field("currency_value","options"); if(get_field("price_layout","options") != "right"){ echo " ".number_format(get_field("price"), 2, '.', ','); } }
sigh oh, alright then:
function get_listing_price() { if(!get_field("price")) { echo "call"; } else { if(get_field("price_layout", "options") == "right"){ echo number_format(get_field("price"), 2, '.', ',')." "; } echo the_field("currency_value", "options"); if(get_field("price_layout","options") != "right") { echo " ".number_format(get_field("price"), 2, '.', ','); } } }
although shouldn't "do job me"...
Comments
Post a Comment