These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.
Just in case anyone needs to reformat the date for the “Date Available” in rentals here is the custom function that I created to do it (copy and paste the below in your functions.php file):
function my_property_available_dates() {
global $property;
if( 'rental' == $property->post_type && $property->get_property_meta('property_date_available') != '' && $property->get_property_meta('property_status') != 'leased' ) {
// Rental Specifics
$date = $property->get_property_available();
$t1 = strtotime($date);
$d1 = getdate($t1);
$long = "F j, Y";
echo '<div class="date-available">Property Available: ';
printf("%s", date($long, $t1));
echo '</div>';
}
}
add_action('my_property_available_dates','my_property_available_dates');
and then, in your “content-listing-single.php” template file (remember to create a folder called “easypropertylistings” and place a copy of this file in your theme to override the EPL templates) you can replace the original <?php do_action('cps_property_available_dates');// meant for rent only ?>
with the new custom function to display the reformatted date: <?php do_action('my_property_available_dates');// meant for rent only ?>
For more date formats check out the PHP page: http://php.net/manual/en/function.date.php
Hope this helps.
-Richard @ Willhouse
These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.
Be the first to know about the latest updates and exclusive promotions from Easy Property Listings by submitting your information below.
As always Merv is amazing!