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.

Please read the full Themeforest support policy is available here for further information (https://themeforest.net/page/item_support_policy).

Technical: Show register form first on the Register/Login

To get the registration form first when open Register/Login must make code changes on control.js file and at line 1819 (3.7 theme version)  add jQuery(‘#widget_register_topbar’).trigger(‘click’); as shown on this screenshot: Helpful links Technical How to: Child theme If you use minify option in the theme options check this help:      How to make child […]

Technical: How to change the color of views bar in property page

The color of  view bar can be changed from wpresidence\js\property.js     You need to add backgroundColor like this datasets: [ { label: wpestate_property_vars.property_views, backgroundColor:”rgba(228,190,110,1)”, 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: traffic_data }, ]

How to hide Agency and Developer City, Area, County and Address fields

Add the following css to hide City and Area in submit   For developer profile .add-estate .developer_city_wrapper, .add-estate .developer_county_wrapper, .add-estate .developer_area_wrapper, .add-estate .developer_address_wrapper { display: none; } For Agency profile .add-estate .agency_city_wrapper, .add-estate .agency_county_wrapper, .add-estate .agency_area_wrapper, .add-estate .agency_address_wrapper { display: none; }  Help article for how to add custom CSS Tip: If you have theme […]

Technical: Hide a specific tab in property page (default template)

How to hide the Details Tabs Please add the below css in Theme Options-> Design -> Custom CSS or in Child Theme -> style.css: #tab_prpg li a[href=”#details”] { display: none; } Help to add custom css for Residence Theme https://help.wpresidence.net/article/how-to-add-custom-css/ Please remember to clear cache to see results. Help for Residence https://help.wpresidence.net/article/enable-or-disable-wp-residence-cache/

Technical: Remove Trim Title from Property InfoBox

The information is related to google maps infobox ​ In js/google_js/mapfunctions.js look for function wpestate_createMarker – around line 750 and replace this code var title= this.title.substr(0, 30); if(this.title.length > 30){ title=title+”…”; } with var title= this.title; Do the same for function wpestate_createMarker_sh at line 523 in the same file.

Technical: Change default user type in register form

The “register code” is in wpresidence/libs/ajax_functions.php , function wpestate_ajax_register_user the user level is set via this code update_user_meta( $user_id, ‘user_estate_role’, $new_user_type) ; ​$new_user_type is set via $new_user_type = intval($_POST[‘new_user_type’]); Because of the intval function , if there is nothing in $_POST[‘new_user_type’] the value saved will be 0 You can set the value by checking $_POST[‘new_user_type’] […]

Technical – How to remove a category from dropdown list (search fields, properties list filters)

To remove only specific categories from a list, can use a CSS trick, Attribute Tutorial: https://css-tricks.com/almanac/selectors/a/attribute/ ​ Apply this formula to theme search value you want to remove. Ex: To remove “Sold” from this dropdown Css Used: .filter_menu [data-value=”sold”] { display: none!important; } And should apply in header search and half map search Hide specific […]

Technical How to: Child theme

Video Tutorials for How to work with a child Theme in WpResidence In this document we will try to explain how you can work with child theme in order to customize your website. The theme pack comes with an already made child theme – How to Install WpResidence Child theme Css code All the custom […]

Technical: Add a new filter to Property Directory List

First of all, you need to add the new field in the sidebar list  – you do that in wpresidence/templates/directory_filters.php  The actual search is made via Ajax The js events are in wpresidence/js/property_directory_control.js.  ​ Add your event (click/change) and call function wpestate_directory_filtering_action in the same file In that function read the new field and send […]

Technical: Edit Open in Google Maps link with property latitude and longitude

In wpresidence/libs/listing_functions.php at line 324 add this code $url= get_post_meta($post_id,’property_latitude’,true).’,’.get_post_meta($post_id,’property_longitude’,true); $google_map_url = “https://www.google.com/maps/@”.$url; or $url= get_post_meta($post_id,’property_latitude’,true).’,’.get_post_meta($post_id,’property_longitude’,true); $google_map_url = “http://maps.google.com/?q=”.$url; ​It should look like this

New Buttons Design – How to change hover effect

This is the css for default button and hover color to apply and edit. .comment-form #submit, .wpresidence_button { text-shadow: none; margin-bottom: 15px; border-radius: 0; text-transform: capitalize; padding: 8px 34px; border: 1px solid; line-height: 2; border-color: #2470af; color: #fff; background-color: #2470af!important; background-image: -webkit-gradient(linear,left top,right top,color-stop(50%,transparent),color-stop(50%,#2470af)); background-image: linear-gradient(to right,transparent 500%,#2470af 50%); background-size: 200% 100%; background-position: right bottom; […]

Technical: Post date in property

You can use WordPress code to add date through php file modifications https://codex.wordpress.org/Function_Reference/the_date The single estate property page is single-estate_property.php You can style it further as you wish by adding a custom class and then modifying the css for that class in custom css:

Change Font Awesome Icons in Unit Type 2

Icons are added using below CSS: .property_listing.property_unit_type2 .property_listing_details .infobath_unit_type2:before{ content: “\f043”; font: normal normal normal 14px/1 FontAwesome; margin-right: 7px; } .property_listing.property_unit_type2 .property_listing_details .infosize_unit_type2:before{ content: “\f278”; font: normal normal normal 14px/1 FontAwesome; margin-right: 7px; } .property_listing.property_unit_type2 .property_listing_details .infogarage_unit_type2:before{ content: “\f1b9”; font: normal normal normal 14px/1 FontAwesome; margin-right: 7px; } .property_listing.property_unit_type2 .property_listing_details .inforoom_unit_type2:before{ content: “\f236”; font: normal […]

How to set the Google Maps API for China

From Google website: The Google Maps APIs are served within China from http://maps.google.cn. When serving content to China, replace https://maps.googleapis.com  with http://maps.google.cn. The maps.googleapis.com is set in wp-content/themes/wpresidence/libs/css_js_include_helper.php Go on  wp-content/themes/wpresidence/libs/css_js_include_helper.php and replace  https://maps-api-ssl.google.com   with      https://maps.google.cn

How to remove first option from theme search taxonomies dropdown

In theme we have 5 taxonomies: action, category, city, area and state. In search dropdown it has as the first option: -“Categories” for  action taxonomy, -“Types” for category taxonomy, -“Cities” for city taxonomy, -“Areas” for area taxonomy, -“States” for state taxonomy. They are available to help users find all categories after selecting one item – […]

How change price number format

For theme version 3.9.1 and higher In order to change the number format must modify below files from: wpresidence\libs\help_functions.php ——————————- The details below will apply for older theme versions For price number format we use the number_format function. See this topic: http://php.net/manual/en/function.number-format.php In order to change the number format must modify below files from: wp-content/themes/wpresidence 2. wp-content/plugins/wpresidence-core Indian […]

Technical How to replace thumb for latest listing widget with another existing thumb 

Code for latest listing widget is in plugins\wpresidence-core\widgets\footer_latest_widget.php file. It has two design types: slider and list. We use two thumbs depending of the design of it. For list type is used thumb named ” widget_thumb” For list type is used thumb named ” property_listings” In order to use another thumb you must change the existing […]

How to keep floor plans closed by default on property page. How to disable floor plan lightbox

Go to libs\listing_functions.php and on   function estate_floor_plan  Delete style=”display:block”;  from variable $show How to disable floor plan lightbox Screenshot is from theme version 3.3 To disable floor plan, add return like in this screenshot in wpresidence/js/control.js file To remove the floor plan image link Remove href entirely as in this screenshot https://prnt.sc/tjfu1v in wpresidence/libs/listing_functions.php

Show agent images in full, without crop

To avoid using large images, the theme creates small versions of the original images uploaded and uses the small versions (thumbs) in different theme sections. For agents the theme uses the following thumb property_listings. Read more on thumbs here. To remove the resize rule for agent images you can edit the code as it follows. […]

Show portrait images in property slider without crop

By default, we use a thumb version of the original image in theme vertical and horizontal sliders in order to keep page size to a minimum size. The slider images dimensions for a page with a sidebar is set to resize all images to 825×461 in the file called wpresidence/general-settings.php. Change the resize rule add_image_size(‘listing_full_slider’ […]

Technical – How to add more extra agents

From speed reasons, the number of agents that will show in admin agent list from property page is limited to 150 of agents In order to remove the limitation, you need to go to wpresidence\libs\plugins\wpresidence-core\post-types and replace 150 with -1  

How to enable thumbs for vertical slider in responsive design

The thumbs for property page gallery were removed from responsive for lack of design space, and the slider next/prev arrows are used to navigate between the slides. If you wish to add the thumbs – you can use this custom css http://prnt.sc/cnbm2u Show circles: @media only screen and (max-width: 640px){ .caption_control, #carousel-listing .carousel-round-indicators, .carusel-back, #carousel-listing .carousel-indicators, […]

How to Display Category Descriptions

The theme uses the taxonomy description in page source for SEO reasons, however, you don’t see it visible on the category page as we allow users to add a different kind of content in such pages. Here is the code of a page with the category description showing (search engines read this value and index […]

How to change-auto-complete-address-rules-different-fields

In order to change rules for autocomplete you need to go to wpresidence\js\google_js\ google_map_submit and change the levels as per your needs All details on Google geocoding can be found here: https://developers.google.com/maps/documentation/geocoding/intro This is helpful for the clients that use Google autocomplete feature and the input from Google is not accurate, for example,the city is saved as area. […]

How to stop Sending Edit Listing Notifications

The emails sent from the theme can be managed from Theme Options > Advanced > Email Management. You can leave blank the subject field and the notification will NOT be sent. This applies to any notification from Theme Options > Advanced > Email Management.    

How to hide address elements from Add New property with custom css

To hide address elements from submission form plaese use the below CSS.  The css needs to be added in Theme Options-Design-Custom Colors=-Custom CSS or Child Theme-Style.css 1.Address field [for=”property_address”] { display: none; } [id=”property_address”] { display: none; } 2. County/State [for=”property_county”] { display: none; } [id=”property_county”] { display: none; } 3. City [for=”property_city”] { display: […]

How to display decimals on default property price

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

Edit Breadcrumbs URL

The breadcrumbs are in templates/breadcrumbs.php. If you want to change the way they are displayed you can modify the file. Please note that there some check in there like if the page is a category or if is a front page if( $category!=”){ print ‘<li>’.$category.'</li>’; } if(!is_front_page()){