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

Understanding and Extending blog post carousel in WpResidence Theme

The postslider.php file, located at templates/blog_post/postslider.php in the WpResidence theme, is responsible for displaying a carousel of images or videos at the top of blog posts. This component enhances the visual appeal of your blog posts and allows for showcasing multiple media items. File Structure and Functionality Let’s break down the file structure and explain […]

WpResidence Agents List Template Guide

The template, located in the page-templates/agents_list.php directory of the WpResidence theme, is responsible for displaying a list of agents in a grid format. This template includes functionality for pagination and dynamic column sizing, making it a versatile tool for showcasing your real estate agents. Template Structure and Functionality Let’s break down the template file step […]

WPResidence Blog List Template Guide

Comprehensive Guide to WPResidence Blog List Template Introduction This guide provides an in-depth explanation of the blog_list.php template file in the WPResidence theme. We’ll explore its structure, functionality, and how to extend or customize various components. Template Location and Purpose The blog_list.php file is located in the page-templates\blog_list.php Its primary purpose is to display a […]

WPResidence Blog Unit Templates

In the WPResidence theme, blog posts are displayed using various “blog unit” templates. These templates control the appearance and structure of individual blog post entries in different contexts, such as archive pages, search results, and custom blog list pages. This guide will explore four main blog unit templates: blog_unit.php blog_unit2.php blog_unit3.php blog_unit4.php Each of these […]

WpResidence Agent Card Templates Guide

WpResidence Agent Card Templates Guide Introduction WpResidence theme offers multiple agent card templates to display agent information in various styles. This guide covers four main templates: agent_unit.php, agent_unit_v2.php, agent_unit_v3.php, and agent_unit_v4.php. Each template is located in the templates/agent_card_templates/ directory of the theme. 1. agent_unit.php This is the default agent card template. It displays a comprehensive […]

WpResidence Developer and Agency List Templates Guide

This guide explains the functionality and customization options for the Developer List and Agency List templates in the WpResidence theme. These templates are responsible for displaying lists of developers and agencies in a grid format. Template Files Developer List: page-templates/developers_list.php Agency List: page-templates/agency_list.php Both templates share similar structures and functionalities, with minor differences specific to […]

Understanding and Customizing Property List Templates in WpResidence

Understanding and Customizing Property List Templates in WpResidence Introduction The property_list.php and property_list_half.php files are key templates in the WpResidence theme, responsible for displaying property listings in different layouts. These files can be found in the root directory of the WpResidence theme. Template Structure and Functionality 1. property_list.php This template displays a full-width list of […]

Technical: Add auto-play to Classic Slider for Properties

To add auto-play to WpResidence Classic Slider for properties, please follow these directions in js/control.js – line 3107 – please add autoplay:true   ​ ​To control timeout, add also autoplayTimeout:5000 Where 5000 is 5sec You can also look over this document https://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html and see what other options (and how)  you can implement.

Technical: How to Add a new taxonomy

In order to add a new taxonomy, you need to add this code to a child theme. Our theme pack comes with one, so you need to activate that first. In functions.php add the following code: add_action(‘init’, ‘wpestate_create_property_type_child_theme’, 30); if (!function_exists(‘wpestate_create_property_type_child_theme’)): function wpestate_create_property_type_child_theme(){ register_taxonomy(‘property_custom_category’, array(‘estate_property’), array( ‘labels’ => array( ‘name’ => esc_html__(‘Categories Custom’, ‘wpresidence-core’), ‘add_new_item’ […]

How to: Increase the circle on map when the property location is hidden

In Theme Options-Property page-Map you have the option to Hide map location? If enabled on the property page you will have a circle on the map instead of the pin with the exact location   To change the size of the circle you need to make changes in the theme code: GOOGLE MAPS The change […]

How to add text to the Login / Register Icon in header

This is an example of CSS code that can help add text to the Login / Register icon in top – header .submit_action:before { content: “Add Property”; } .submit_action { float: left; display: flex; justify-content: center; flex-wrap: nowrap; align-content: center; align-items: center; flex-direction: row; }

Technical: Show register form first on the Register/Login

o display the registration form first when clicking on the icon in the header that shows the Register/Login forms, follow these steps: Log in via FTP and access the wpresidence/js/control.js file. Edit the control.js file. If you are using theme version 4.22, navigate to line 1180. add jQuery(‘#widget_register_topbar’).trigger(‘click’); as shown on this screenshot: After you […]

Techinal how to: Change the color of the bars in the Statistics View section

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 }, ] So statistics in Dashboard. You can go into /wpresidence/js/ajaxcalls.js At lines 31 and 110 (one is for user […]

Technical – how to always show decimals for price even when 00

Development team recommends to try this quick change to show decimals always – even when 0 Look for function wpestate_format_number_price  in wpresidence/libs\help_functions.php ​ Change from 0 to 2 To make the change in Child theme: The function wpestate_format_number_price is wrapped in if (!function_exists(‘wpestate_format_number_price’)): – that means is child theme ready, Copy the function into the […]

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