Okay
  Print

How to add new fields property

If you want add new field you can add custom code in location file : "wp-content\themes\reality-child\function.php" 

Note: You need use child theme because after update new version, all custom code in folder themes\reality will remove.

function iwp_property_fields_custom( $group_fields ) {
 $group_fields['details']['fields'][] = array(
 'name' => 'xxx1',  // change name you want
 'placeholder' => 'xxx1',  //change placeholderyou want
 'id' => '_iwp_xxx', // change id
 'type' => 'number',  // choose number or text
 'allow_compare' => '1',
 'allow_required' => '1',
 'allow_disabled' => '1',
 'allow_package_disable' => '1',
 );
 return $group_fields;
}
add_filter( 'iwp_property_fields', 'iwp_property_fields_custom' );

http://prntscr.com/joupua

http://prntscr.com/joupyr

http://prntscr.com/jouqc1

Create custom template in child theme: 

http://prntscr.com/k1ivu1

Copy file description.php, description-style2.php, description-style3.php to location : "wp-content\themes\reality-child\iwproperty\property-details\" 

And go to location file : "wp-content\themes\reality-child\iwproperty\property-details\description.php"

 remove code in line 97 add custom code to file : 

And go to location file : "wp-content\themes\reality-child\iwproperty\property-details\description-style2.php"

 remove code in line 75 add custom code to file : 

And go to location file : "wp-content\themes\reality-child\iwproperty\property-details\description-style3.php"

 remove code in line 139 add custom code to file : 

<?php endif;
   if ( get_post_meta( $property->get_id(), '_iwp_xxx', true ) ) : ?>
      <div class="iwp-item">
          <span><?php esc_html_e( 'xxx', 'iwproperty' ); ?>:</span> <?php echo get_post_meta( $property->get_id(), '_iwp_xxx', true ); ?>
      </div>
<?php endif; ?>


*** Create Mutil Fields ***

You can create mutil fields , see my custom code: 

function iwp_property_fields_custom( $group_fields ) {
 $group_fields['details']['fields'][] = array(
 'name' => 'xxx1',  // change name you want
 'placeholder' => 'xxx1',  //change placeholderyou want
 'id' => '_iwp_xxx', // change id
 'type' => 'number',  // choose number or text
 'allow_compare' => '1',
 'allow_required' => '1',
 'allow_disabled' => '1',
 'allow_package_disable' => '1',
 );
  $group_fields['details']['fields'][] = array(
 'name' => 'xxx2',  // change name you want
 'placeholder' => 'xxx2',  //change placeholderyou want
 'id' => '_iwp_xxx2', // change id
 'type' => 'number',  // choose number or text
 'allow_compare' => '1',
 'allow_required' => '1',
 'allow_disabled' => '1',
 'allow_package_disable' => '1',
 );
  $group_fields['details']['fields'][] = array(
 'name' => 'xxx3',  // change name you want
 'placeholder' => 'xxx3',  //change placeholderyou want
 'id' => '_iwp_xxx3', // change id
 'type' => 'number',  // choose number or text
 'allow_compare' => '1',
 'allow_required' => '1',
 'allow_disabled' => '1',
 'allow_package_disable' => '1',
 );
 return $group_fields;
}
add_filter( 'iwp_property_fields', 'iwp_property_fields_custom' );

the new field does not appear in compare page,

You can go to Properties Settings > Fields > Compare Fields

http://prntscr.com/k1v62y