JoeHana
6/11/2013 - 12:40 PM

Add 'from' before price

Add 'from' before price

<?php

/**
 * Add 'from' before price
 */
 
add_filter( 'wpcasa_property_price', 'wpcasa_property_price_from' );
 
function wpcasa_property_price_from( $price ) {
  
	$arg1 = get_post_meta(get_the_ID(), '_price', true);
	$arg2 = get_post_meta(get_the_ID(), '_price_sold_rented', true );

	if(!empty($arg1) && $arg2 != '1') {    
		$output = '<small>from</small> ' . $price;
	} else {
		$output = $price;
	}
	
	return $output;
 
}