WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / Technical how to | Custom Code / Technical how to remove default property fields

Technical how to remove default property fields

4416 views 3

If you wish to delete the fields that are not in the custom fields list, these are the files to modify

compare_listings.php – compare page
libs/listing_functions.php – front end page
libs/property.php – admin edit property page
templates/submit_templates/ – submit form

Example:

Remove Bedrooms from property front page:

Go to libs/listing_functions.php

Comment or delete this code:

line 285

$property_bedrooms = floatval ( get_post_meta($post_id, 'property_bedrooms', true) );

line 317

 if ($property_bedrooms != ''){
        $return_string.= '<div class="listing_detail col-md-4"><strong>'.__('Bedrooms','wpestate').':</strong> ' . $property_bedrooms . '</div>'; 
    } 

Remove Bedrooms from compare

go to compare_listings.php

Delete or comment code at line 62

    $property['property_bedrooms']  =   intval( get_post_meta($post->ID, 'property_bedrooms', true));

And line 121

   =>__('rooms','wpestate'),
                        'property_bedrooms'

Remove Bedrooms from front end submission

in templates/submit_templates/property_details.php

Delete or comment Line 31

    <p class="half_form half_form_last">
        <label for="property_bedrooms "><?php _e('Bedrooms','wpestate');?></label>
        <input type="text" id="property_bedrooms" size="40" class="form-control"  name="property_bedrooms" value="<?php print $property_bedrooms;?>">
    </p>

Css Workarounds:

Remove country from the property page

#accordion_prop_addr .listing_detail:nth-of-type(6) {
    display: none!important;
}
Technical how to | Custom Code

Related Articles

  • How to Add Custom Fields to the Login, Register and Forgot Password Forms
  • Technical: Change the Schedule Tour Email Text and the Form Default Message
  • Property list filter customization
  • Technical – How to Change the Minimum Image Dimensions for Property Uploads in WPResidence
MLSImportWordPress IDX Plugin for MLS ListingsImport MLS listings into your WordPress website, customize your property pages, and keep your inventory updated.Start free 30-day trial →

Help Categories

  • 111 Installation & Changelog
  • 19Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 14Footer
  • 38Header
  • 2IDX & MLSImport
  • 23Maps & Location Settings
  • 50Multilingual Websites – WPEstate Translate (Included)
  • 21Pages & Page Templates
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 38Property Single Page
  • 32Search & Filtering
  • 170Technical how to | Custom Code
  • 9Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Theme Translation & Localization
  • 28Third Party Plugins Compatible
  • 16WPBakery Shortcodes
  • 51WPResidence / WPEstate CRM
  • 9WPResidence Elementor Studio
  • 39WPResidence Elementor Widgets
  • 79WPResidence FAQ

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API