In WpResidence you can choose between 5 property card units which will be used in all lists, in grid view or list view by default.

See this help where is explained how to choose property unit type: http://help.wpresidence.net/article/default-property-card-units/

 

To add, change or edit details inside this property unit you need to edit the file according to property unit selected from theme options:

  • for default card the code is in wp-content\themes\wpresidence\templates\property_unit.php  file
  • for card type 1 the code is in wp-content\themes\wpresidence\templates\property_unit_type1.php  file
  • for card type 2 the code is in wp-content\themes\wpresidence\templates\property_unit_type2.php  file
  • for card type 3 the code is in wp-content\themes\wpresidence\templates\property_unit_type3.php  file
  • for card type 4 the code is in wp-content\themes\wpresidence\templates\property_unit_type4.php  file

Above files are used on all properties list, so you need to be aware that any change made here will propagate all over the theme.

A few explanations about what is inside of default unit card – wp-content\themes\wpresidence\templates\property_unit.php  file

– If you chose to show the property unit slider – the code for this feature is displayed in this screenshot:

 

– The link is saved as the $link variable.

-The title is displayed using below code
echo mb_substr( $title,0,44);
if(mb_strlen($title)>44){
echo '...';
}

– Details like rooms, bathrooms, size are displayed as displayed on this screenshot:

This is how variables are defined:

– The excerpt (description)

 

– The price is displayed  via function
wpestate_show_price($post->ID,$currency,$where_currency);

– The default image is displayed using below code
$preview = wp_get_attachment_image_src(get_post_thumbnail_id(), 'property_listings');

 

If you want to delete something : If is possible use css display:none; otherwise  just delete/comment the code.

 

If you want to add something.
a. if you want to show taxonomy details use code like this

$property_city = get_the_term_list($post->ID, 'property_city', '', ', ', '') ;
$property_area = get_the_term_list($post->ID, 'property_area', '', ', ', '');

 

b.if you want to show custom field use code like:
$custom_field = get_post_meta($post->ID, 'custom_field, true);

*** if you add a custom field name called “long field” he is saved into dabase as “long-field”. So the above line will become

$long-field= get_post_meta($post->ID, 'long-field, true);

Notes –

the icons for bedroom, size and baths are loaded via css as backgorund for a span with classes inforoom,infobath,infosize.

.property_location .infobath {
font-size: 13px;
background-image: url('./css/css-images/icon_bath1.png');
height: 19px;
background-repeat: no-repeat;
background-position: 0px 2px;
margin-right: 7px;
padding-left: 18px;
color:#99a3b1;
}

The grid classes from bootstrap are set in the beginning of the file (col-md-4 means 3 on the row , col-md-3 means 4 on the row …etc) –

$col_class = 'col-md-4';
$col_org = 4;

if($options[‘content_class’]==’col-md-12′ && $show_remove_fav!=1){
$col_class = ‘col-md-3’;
$col_org = 3;