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

Load map on China

From their 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 libs/css_js_include_helper.php Go on  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: -“All action” for  action taxonomy, -“All types” for category taxonomy, -“All Cities” for city taxonomy, -“All Areas” for area taxonomy, -“All Counties/States” for state taxonomy. In order to remove these labels from dropdown must make changes as explained […]

How change price number format

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

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

Show portrait images in property slider without crop

Vertical Slider https://wpresidence.net/properties/condo-in-financial-district/ The code for carousel vertical is in templates\listingslider-vertical.php file. Images are resized using two resize rules: listing_full_slider  and  listing_full_slider_1 To remove the resize rule for images must edit templates\listingslider-vertical.php and replace above resize rules with full.   Next must add below css in Theme options – Design – Custom CSS ( help:  http://help.wpresidence.net/article/how-to-add-custom-css/ ) .carouselvertical .carousel-inner>.item.active img […]

How to remove agent limitation from property page-back-end

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 change default order on Taxonomy page

This example is for how to change from Default order to Price High to Low on Taxonomy pages- standard view: In taxonomy.php file Look for ‘meta_key’ => ‘prop_featured’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’, Replace with ‘meta_key’ => ‘property_price’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’, Make sure you write PHP, not copy/paste. So you don’t copy […]

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

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()){  

How to manage Comments Display

If you have in comments section such a wrong display alignment as in this screenshot. Open SCREEN OPTIONS and un-check “In Response To”

How to show Login Modal After User Successfully Register

Please add the following code in ajaxcalls.js as displayed in below screenshot: setTimeout(function(){ jQuery(‘#widget_login_topbar’).trigger(‘click’); }, 3000); After the “you can login” message is displayed the script will wait for 3 seconds and then display the login form. If you want to change the waiting duration replace the 3000 with your number (1sec = 1000 )

Remove decimals from property size number format. Change thousand separator

To remove decimals from measurement units must change number format for size value to not include decimals. Help for number format issue: http://php.net/manual/en/function.number-format.php Screenshot with the place where must change it wp-content/themes/wpresidence/libs/help_functions.php Original code with 2 decimals Modified code with 0 decimals Change thousand separator, ex “1,248” instead of  “1 248” , apply the thousand separator […]

Property Card – How to open in new page

For both WpResidence and WpEstate theme you need to edit the file templates/property_unit.php For the links that want to open in a new page you need to add target=”_blank”. Please note that there are several places where you need to make this change – Look for the

Advanced Search Results Ordered by Price

I want to ask how can sort the results of the advanced search page, ordered by price is my goal. —answer— Instruction after 1.10 theme update In this case the place to edit is searchfunctions.php at line 307 ‘meta_key’ => ‘prop_featured’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’, Also in advanced_Search_results.php you may need to remove […]

Order by EDIT DATE

In wordpress there are 2 order situations by date: – first publish date – edit publish date We use order by first publish date and edit date is not considered. So default order will consider the first publish date. The technical solution is to modify the query orderby, but it’s sensitive when working with custom […]

How to make Similar Listings by the same City

Go to templates/similar_listings.php Remove or comment the code below //////////////////////////////////////////////////////////////////////////// /// compose taxomomy action array //////////////////////////////////////////////////////////////////////////// And below //////////////////////////////////////////////////////////////////////////// /// compose taxomomy categ array //////////////////////////////////////////////////////////////////////////// Screenshot Original code   After code is modified

Order Properties List by Publish Date

In wordpress there are 2 order situations by date: – first publish date – edit publish date We use order by first publish date and edit date is not considered. So default order will consider the first publish date. The technical solution is to modify the query orderby, but it’s sensitive when working with custom […]

Remove space between currency symbol and price

In order to remove space between currency and price you must make code changes in function wpestate_show_price from wpresidence/libs/help_functions.php The edit must be done in several places, same file. Do a file search by $currency name to find all the places.

How to add icons to Featured and Amenities

In order to add icons to features and amenities from property page must build CSS for each element using :nth-of-type() and before css  selectors . !!! This workaround works only if is setup to display all features and amenities!! Example: First remove exiting icons using below CSS: For accordion #accordion_prop_features .listing_detail i { display: none; } […]

How to limit google autocomplete suggestions to a single country

To achieve above you must add  component Restrictions in the google_map_submit.js file   as displayed in  below screenshots: Add  componentRestrictions: {country: ‘fr’}  at line ~ 221 2. Add  componentRestrictions: {country: ‘fr’}  at line ~247 3. Add  componentRestrictions: {country: ‘fr’}  at line 273 For google radius search from half map make the change in control.js file  

How to force google autocomplete to return results in one language

By default the API detects the browser settings of the user and set the language appropriately. To force google autocomplete to return results in one language must add language for autocomplete. Add highlighted code in css_js_include.php as displayed in  below screenshot:

How to add Whatsapp share button in default property page

To add Whatsapp share in property page add below code in single-estate_property.php file <a href=”whatsapp://send?text=<?php echo urlencode (get_the_title() .’ ‘. get_permalink()); ?>” data-action=”share/whatsapp/share”><i class=”fa fa-whatsapp”></i></a> Screenshot: For property pages build using custom page template must add the new share option in function wpestate_estate_property_design_intext_details ()  from wpresidence\libs\plugins\wpresidence-core\shortcodes\ property_page_shortcodes.php file. Please note that support is limited to questions regarding […]

How to change design of Featured status and Full info button in default unit

To change design of Featured  status change CSS in this class: .featured_div { max-width: 85px; float: left; background-color: #f1bf7f; color: #333333; position: relative; left: 0px; font-size: 12px; border-radius: 0px; padding: 1px 18px; line-height: 17px; background-image: none!important; margin-bottom: 4px; } To change design of Full info button change CSS in these classes: .unit_details_x a, .unit_details_x { […]

To change mail icon / contact us icon design

To change mail icon design change CSS in these classes : .contact-box { font-size: 25px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; background-color: #1a1a1a; padding: 10px 12px; position: fixed; bottom: 10px; right: -125px; z-index: 100; opacity: 0; transition: all .2s ease-in-out; -webkit-transition: all .2s ease-in-out; -moz-transition: all .2s ease-in-out; -ms-transition: all .2s ease-in-out; -o-transition: all .2s ease-in-out; […]