Technical how to | Custom Code Required

This technical help has been written by our development team based on the answers/directions provided to our clients who have asked for directions to modify the code. We published them hoping that they will help other clients with similar requests implement the modifications faster.

Please keep in mind that theme customization services ARE NOT included in the client standard support. Our support team cannot do code modifications for you.

Item support is a service provided directly by us through the FreshDesk ticket system. Support is limited to questions regarding the theme’s features or problems with the theme. We are not able to provide support for code customizations or third-party plugins. If you need help with anything other than minor customizations of your theme, we suggest searching for a WordPress developer on studio.envato.com.

Full Themeforest support policy is available here for further information (https://themeforest.net/page/item_support_policy).

Change background color of Page View Statistics graphic

You can go into ajaxcalls.js and at line 31 and 110 (one is for user dashboard, other for property page) you have this var data = { labels:labels , datasets: [ { label: “My First dataset”, fillColor: “rgba(220,220,220,0.5)”, strokeColor: “rgba(220,220,220,0.8)”, highlightFill: “rgba(220,220,220,0.75)”, highlightStroke: “rgba(220,220,220,1)”, data: values }, ] Change color as you per wish

Enable prettyPhoto on mobile

We disable the prettyPhoto script on mobile because the image may be too small for some screens. If you want to enable it again you need to edit control.js  and at line 1485 remove this code var mediaQuery = ‘has_pretty_photo’; if (Modernizr.mq(‘only screen and (max-width: 600px)’) || Modernizr.mq(‘only screen and (max-height: 520px)’)) { mediaQuery = ‘no_pretty_photo’; […]

How to make child theme changes to work with theme Minifiy option enabled

In order to make child theme changes to work when Minifiy option is enabled, check the following steps: Create style.min.css file by copying css from style.css file and convert it. We created style.min.css  using this site: https://cssminifier.com/  Upload style.min.css file in child theme folder. 2. Replace get_template_directory_uri from child theme with get_stylesheet_directory_uri 3. Replace style.css with style.min.css

Remove sticky header

In order to remove sticky header should be used below CSS: .master_header { position: absolute; }

Technical: Enable Map Zoom In and Zoom Out on mouse scroll

DISCLAIMER: This technical help has been written by our development team based on the answers/directions provided to our clients who have asked for directions to modify the code. We published them hoping that they will help other clients with similar requests implement the modifications faster. Please keep in mind that theme customization services ARE NOT […]

How to remove default Property ID

To remove the Automatic ID from front end – Property Page with this CSS. Add in theme options – design – custom colors – custom css: #propertyid_display{ display:none; }  

Change date format

  Change date format for Schedule a showing option   To change date format must be changed date format yy-mm-dd in property,js file   For the attached image – go into membership.php,  function wpestate_get_pack_data_for_user_top at line 170. In that function look for $expired_date = date(‘Y-m-d’,$expired_date); at line 212 The front_end_submission.php is in templates folder . Also look […]

Technical how to: How to add comments on property page and agent page

For property page, you add this code in single-estate_property.php <!– #comments start –> <?php comments_template(”, true);?> <!– end comments –> After </div><!– end single content –> Like </div><!– end single content –> <!– #comments start –> <?php comments_template(”, true);?> <!– end comments –> </div>     FOR AGENT: Do the same but in single-estate_agent.php

Change step in sliders

To change the step size in slider you need to open the control.js file from js folder and go to line 644. There you have the function wpestate_enable_slider(); Add the “step code ” after the value data in slider creation code . Should have something like jQuery(“#” + slider_name).slider({ range: true, min: parseFloat(slider_min), max: parseFloat(slider_max), values: […]

Techinal how to: Change the color of the bars in the Statistic View

You can go into ajaxcalls.js and at line 31 and 110 (one is for user dashboard, other for property page), and in property.js at line 25 where you have this: var data = { labels:labels , datasets: [ { label: “My First dataset”, fillColor: “rgba(220,220,220,0.5)”, strokeColor: “rgba(220,220,220,0.8)”, highlightFill: “rgba(220,220,220,0.75)”, highlightStroke: “rgba(220,220,220,1)”, data: values }, ] Change […]

How to remove countries from the dropdown

Edit the list of countries from these theme php files 1 – wpresidence\libs\theme-admin.php Line 2924 (in theme version 1.14): $countries = array(__(“Afghanistan”,”wpestate”),__(“Albania”,”wpestate”),__(“Algeria”,”wpestate”),__( 2 – wpresidence\libs\property.php Line 891: (in theme version 1.14): $countries = array(__(“Afghanistan”,”wpestate”),__(“Albania”,”wpestate”),__(“Algeria”,”wpestate”),__(

Uploaded images – minimum size requirements

If you want to change the minimum size requirements for the property images and my profile image (now is 500px per 500px) you need to go into libs/ajax_upload.php and at line 47 you have this code if( intval($file[‘height’])<500 || intval($file[‘width’]) <500 ){ All you need to do is to replace the 500 with the new […]

Disable pagination on advanced search results/property lists

If you are using the classic template you need to go to templates/normal_map_core.php and delete this line <?php kriesi_pagination($prop_selection->max_num_pages, $range =2); ?> Is around line 196 If you are using the half_map_core delete the same code as above- around line 160 Since the property list and advanced search results use the same templates to display […]

Make payments recurring by default

In user_membership_profile.php at line line 55 you have <input type=”checkbox” name=”pack_recuring” id=”pack_recuring” value=”1″ style=”display:block;” /> replace that with <input checked type=”checkbox” name=”pack_recuring” id=”pack_recuring” value=”1″ style=”display:block;” />     If you are doing this via child theme look over this article also : http://help.wpresidence.net/2015/12/11/technical-how-to-child-theme/

Technical how to: property Page Map – show only property pin

Starting theme version 1.15 – you can use the single property map shortcode – http://help.wpresidence.net/2016/03/25/1-15-google-map-with-property-marker-shortcode/   In 1.18 theme version in property page is displayed only the property pin in property page map. —- For those that have lower theme version than 1.18 and wish to add this functionality must follow below steps: If you want […]

Add new measurement unit (beside ft2 and m2)

First you need to go into theme-admin.php and in function new_wpestate_theme_admin_general_settings you have array( ‘name’ => __(‘feet’,’wpestate’), ‘unit’ => __(‘ft’,’wpestate’), ‘is_square’ => 0 ), array( ‘name’ => __(‘meters’,’wpestate’), ‘unit’ => __(‘m’,’wpestate’), ‘is_square’ => 0 ), array( ‘name’ => __(‘acres’,’wpestate’), ‘unit’ => __(‘ac’,’wpestate’), ‘is_square’ => 1 ), array( ‘name’ => __(‘yards’,’wpestate’), ‘unit’ => __(‘yd’,’wpestate’), ‘is_square’ => […]

How to keep Accordions closed by default on property page

Go to templates/property_page_acc_content.php  a Add class “collapsed” to the link below <a data-toggle=”collapse” data-parent=”#accordion_prop_details” href=”#collapseOne” aria-expanded=”true” class=””> becomes <a data-toggle=”collapse” data-parent=”#accordion_prop_details” href=”#collapseOne” aria-expanded=”false” class=”collapsed”>   on the h4 element add the class “carusel_closed” <h4 class=”panel-title” id=”prop_det”>Details </h4> becomes <h4 class=”panel-title carusel_closed” id=”prop_det”>Details </h4> Remove class “in” on the div – add also style=”height: 0px;” <div id=”collapseOne” […]

Technical How to: How Login /Signup works

In WPResidence both register and login functions works via ajax: That means the action is triggred via JavaScript and the actual login/signup is made in php. For example when you push the login button a javascript function is called $(‘#wp-login-but-topbar’).click(function () { wpestate_login_topbar(); }); In the function wpestate_login_topbar() we read the username and pass and send […]

Technical How to: print functions on property page

The print function that appears on the property page is made via ajax. It means the action is triggered in the JavaScript while the actual print function is in php. The JavaScript code can be fond in control.js around line 700 $(‘#print_page’).click(function(event){ var prop_id, myWindow, ajaxurl;   The php function that create the “print” is […]

Technical how to remove default property fields

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: […]

How to add a new Google font

In a child theme functions.php add the following code add_action(‘wp_enqueue_scripts’, ‘wpestate_scripts_childtheme’); function wpestate_scripts_childtheme() { $protocol = is_ssl() ? ‘https’ : ‘http’; wp_enqueue_style( ‘wpestate-railway’, “$protocol://fonts.googleapis.com/css?family=Raleway:500,600,400,700,800&amp;amp;subset=latin,latin-ext” ); } Now, you need to replace the raleway font in the above  example with your font. Open the google fonts page and click quick use for your font. You should […]

Optimize images

From what we know EWWW Image Optimizer plugin can resize automatically the images to a max width or height. Please see this plugin: https://wordpress.org/plugins/ewww-image-optimizer…

Open Street View by Default in WP Residence Property Page

Add toggleStreetView(); in google_map_code_listing.js at line 160 (v 1.40)  and it should do the trick. oms = new OverlappingMarkerSpiderfier(map); setOms(gmarkers); wpestate_initialize_poi(map,1); toggleStreetView() ;    

Remove/change navigational arrows

To remove navigational arrows use this CSS in Design – Custom colors – Custom CSs .nav-prev-wrapper, .nav-next-wrapper{ display:none!important; }

How to make address NOT MANDATORY

You need to in user_dasboard_add.php and remove these lines if($property_address==”){ $has_errors=true; $errors[]=__(‘Please submit an address for your property’,’wpestate’); } You need to remove theme twice (add and edit ) – at line 418 and 745

Make property slider thumbs closed by default

You need to edit the templates/listingslider.php 1. On the divs with the class   carousel-indicators  add the extra class rowclosed. After editing should look like  class=“carousel-indicators rowclosed”. 2. After that you need to add rowclosed  class  to the div that has the class  “carusel-back “. <div class=”carusel-back rowclosed”></div> and closed class needs to added to div with […]

Remove breadcrumbs URL

  This is where breadcrumbs show in the front end Remove from theme options – design – general settings   —

Technical How to: Change the + icon on property

The + icon that is on the property unit can be removed/changed by eding the file templates/property_unit.php The plus icon is in the span element with”listing-cover-plus” css class. The code is around line 169 print ‘<div class=”listing-cover”></div><a href=”‘.$link.'”> <span class=”listing-cover-plus”>+</span></a>’;   for the featured property widget the icon is in widgets/featured_property.php at line 62 <a […]

Technical how to : Shortcode files / shortcodes functions

All the shortcodes are registered in libs/shortocdes-install.php In function wpestate_register_button() we add the shortcode buttons to the WordPress visual editor while in wpestate_register_shortcodes() function we register the actual short code and attach it to a function. The shortocdes are added to visual composer interface via vc_map instruction around line 115. if( function_exists(‘vc_map’) ): vc_map( All […]