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

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

To resolve the issue with floor plans in the theme, follow these steps: Modify the Floor Plan Section Go to libs/property_page_functions/property_floor_plan_section_functions.php and locate the function: if ( ! function_exists( ‘estate_floor_plan’ ) ) : function estate_floor_plan( $post_id, $is_print = 0, $wpestate_prop_all_details = ” ) { // Set up print class if needed $is_print_class = $is_print ? […]

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 to keep page size to a minimum size. The slider image dimensions for a page with a sidebar are 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’ , 835, […]

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

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”

Remove decimals from property size number format. Change thousand separator

To remove decimals from property size and property lot size navigate to Theme Options > General > General Settings and set 0 to Properties Size & Lot Size – no of decimals option.   Code location wpresidence/libs/general-functions.php Line 14 $value = number_format($value,$decimals,’.’,$th_separator);  

How to enable sound for video in header

In order to enable sound for videos that are added in header you need to go to libs/help_functions.php at line 245 and just remove the word muted. Help article about how to add video in the header

Technical – How to remove Properties List Filter Options ONLY from taxonomy pages

If you wish that on taxonomy page you do not let users find properties form other categories/types/cities or areas and you simply let people sort the results from that taxonomy, you can use below css for this result .archive .dropdown.listing_filter_select.filter_action_category { display: none; } .archive .dropdown.listing_filter_select.filter_category { display: none; } .archive .dropdown.listing_filter_select.filter_county { display: none; […]

How to make property slider auto scroll in WP RESIDENCE

Depending on listing slider type you have setup you must make the change on listingslider.php  or  listingslide-vertical.php Look for data-interval=”false”> instead of false add miliseconds. 1sec =1000 So add 1000 for 1 second 2000 for 2 seconds

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. For property multi currency remove just the space from 2 places wpresidence/js/google_js/mapfunctions.js in 2 […]

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

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

Technical: 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 article about how to add custom CSS Tip: If you have theme cache enabled, make sure you clear cache to see instant results.

Technical: Add property address or property ID in property unit from My properties – User dashboard

In order to property address in property unit from user dashboard properties list you must add new code in wpresidence\templates\dashboard_listing_unit.php file as explained in below screenshot:   Another example is how to add Property ID <div class=”property_dashboard__local_id”><?php echo intval($post_id);?></div> To modify the tabel header from My Properties Go to wpresidence/libs/dashboard_actions_functions.php Add header column

How to disable lightbox from property page slider

In order to disable lightbox from property page slider should be used below CSS: .carousel-inner { pointer-events: none; } Help article about how to add custom CSS Tip: If you have theme cache enabled, make sure you clear cache to see instant results.

Technical – How to show the Login Modal automatically after User Successfully Registers

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 )

Child Theme: How to add links to copyright message

If you wish to add a link in the footer copyright text, this has to be done by adding custom HTML in the PHP file for the footer. Install the WpResidence Child Theme – https://help.wpresidence.net/article/how-to-install-child-theme/ Edit templates\footer_template.php file locally The code would look like this and it would be added in templates\footer_template.php Upload the modified […]

How to Remove the Number of Images and Address over the default property card

If you wish to not show the address and number of images over the image in property card – use this css To remove the number of photos: .property_media { display: none; } To remove the address over the image: .property_location_image { display: none; } Help article about how to add custom CSS Tip: If […]

Technical How To: Center map pin

The information we add into infoboxes is “attached” tot the actual marker (pin) when we create it. This happens in mapfunctions.js file via function createMarker() To center pin in the map must remove map.panBy from all highlighted places as displayed in the below screenshot, but this will apply for all locations of the map/infobox. Explanations when you […]

Technical how to disable auto zoom of the map

To remove the auto-zoom from the code, the following code instructions must be followed: In wpresidence/js/google_js/mapfunctions.js please go and remove map.fitBounds in function wpestate_fit_bounds – around line 1090. You can set a different level of zoom by changing the “15”  

How to remove sticky header

Sticky menu is set to display by default. You can remove the sticky header by enabling sticky search instead:  You can remove the sticky menu without using sticky search by adding the below CSS: .header_wrapper.customnav { display: none; } Help article about how to add custom CSS Tip: If you have theme cache enabled, make […]

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

Technical how to Enable Map Mouse Zoom In and Zoom Out For Google Maps To enable map mouse zoom in and zoom out edit the following files In  mapbase.js change false to true  for  scrollwheel  and   change  ‘cooperative’   with  ‘greedy‘   for gestureHandling.  Do this change at line 245 and 981.   For map from agency or developer […]