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).

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

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 size number format

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 The file where you must make the change is help_functions.php

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 before 1.10 theme update advanced_search_results.php Look for ‘meta_key’ => ‘prop_featured’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’, Replace with ‘meta_key’ => ‘property_price’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, Make sure you write PHP, not copy/paste. […]

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 libs\property_page_shortcodes.php file. Please note that support is limited to questions regarding the […]

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

Display top bar in sticky header

In order to display top bar in sticky header should be used below CSS: .has_top_bar .master_header_sticky { top: 0px; } .admin-bar.has_top_bar .master_header_sticky { top: 32px; } Help for custom css: http://help.wpresidence.net/article/how-to-add-custom-css/

TECHNICAL: How to setup two different price step for each search tab type

When use tabs in advanced search a slider will get a unique id per tab. The id of the slider is composed as ‘slider_price_’.$term_id; where $term_id is the id of the category. You can also found the id of the slider by  using browser inspect element and select the actual slider . Screenshot Once you […]