Technical how to

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 to redirect Instant Booking Button to WooComemrce Checkout Page

To change the redirect from the Cart Page to the Checkout Page for the instant booking button in WpRentals, you can modify the code in the from the screenshot below. Here’s how you can update it: Locate this line in your wprentals/libs/ajax_functions_edit.php file: php Copy code print ( wc_get_cart_url() ); Replace it with: php Copy […]

Technical – Invoices from My Bookings

If you need to know where the code is located if you want to change the invoice layout, specifically when opening the print button Answer: The Invoice form from My Bookings is created in function wpestate_print_create_form_invoice in plugin wprentals-core\post-types\invoices.php all the details printed in that function come via function wpestate_super_invoice_details in the same file.

Technical: My Bookings

To display the new data in “my bookings” list  items you need to edit dashboard\templates\book-listing-unit.php In that file we call various templates like dashboard/templates/unit-templates/booking_title_section.php dashboard/templates/unit-templates/booking_image.php The booking dates are in the variables $booking_from_date  =   get_post_meta($post->ID, ‘booking_from_date’, true); $booking_to_date    =   get_post_meta($post->ID, ‘booking_to_date’, true); The booking “author” is in variable $author       […]

Technical: Change Membership Price Currency

The membership package price works with the price selected for payments. The format is the standard currency format required by merchants. This ensures payments can work. If you wish to change currency and sync with currency symbol from Price Settings, please see below code you would need to add   Go to wpresidence\templates\dashboard-templates\user_memebership_profile.php add ​$wpestate_currency […]

Technical: How to make the Properties Layout with 2 columns instead of 3

Add this as custom css .listing_wrapper.col-md-4.property_unit_v3.property_flex.propety_unit_3 { width: calc(50% – 16px); } Change the thumb size images as in this help https://help.wprentals.org/article/how-to-change-the-image-size-for-listings-card-units/  You may wish to modify some design elements and that may require using a custom css. You can add custom css in Theme Options > Design > Custom CSS. The modifications you do here are NOT overwritten when you do […]

Child Theme: Change Default Images

Change default user, blog and property images in child theme 1. Install the WpRentals Child Theme and activate it 2. Go by FTP and create the folder img in wp-content/wprentals-child 3. Create the image you want to replace and you save with the same image name and extension on your computer as in the default theme folder. […]

Technical – Reset Counter Inbox

To reset the counter in user dashboard – Inbox for all user accounts, you can apply this code File: \wprentals\user_dashboard_inbox.php   Add the code as in screenshot update_user_meta($userID,’unread_mess’,0);   Check an user inbox to confirm Inbox counter is reset. Remove the code and save.

Technical: Remove Reviews from My Listings in User Dashboard

This change needs to be done in code. I can advise the current theme files c The Header Table – is edited in \wprentals\user_dashboard.php The Reviews / States are edited \wprentals\dashboard\templates\dashboard_listing_unit.php

Technical: Change Stripe Colors

To change the colors for stripe form you need to edit in code the following colors. File path: wprentals/js/wpestate-stripe.js At line 17 you have var card = elements.create(‘card’, { iconStyle: ‘solid’, style: { base: { iconColor: ‘#c4f0ff’, color: ‘#fff’, fontWeight: 500, fontFamily: ‘Roboto, Open Sans, Segoe UI, sans-serif’, fontSize: ’16px’, fontSmoothing: ‘antialiased’, ‘:-webkit-autofill’: { color: […]

iCalendar feed cron – Change to a different recurrence time

By default, the theme runs a WordPress cron job every 3 hours to synchronize calendar availability based on the iCal feeds imported for each property. If you wish to change the default interval (3 hours), follow the steps below: Install the WP Crontrol plugin. Edit the ICAL CRON job. Edit ICAL CRON The cron job […]

Technical – Files for Booking Form / Contact Form placement in Mobile and Type 2

In mobile – we have Make a reservation button – wprentals\templates\mobile_booking.php  line 51 in property page – template Type 2 https://prnt.sc/bigwRqEoawh4 templates\property_page_templates\listing_page_2.php  is template file for type 2 Sidebar with contact form is in function wpestate_show_booking_form -wprentals\libs\help_functions.php around line 1139

How to change the zoom level for the map in property page

To change the zoom for map in all property pages you can make this change  in file js/google_js/maps_base.js –  Add zoom_level=15;  for ex (replace 15 with a number between 1 and 20). However, if you do this change, you will over write any value set in admin area.

Custom Css – Change order on mobile devices for half map

If you wish to change the order of elements on half map results, put the map after the list, you can apply this custom css solution @media only screen and (max-width: 991px){ .full_map_container .row { display: flex; flex-direction: column; } #google_map_prop_list_wrapper { order: 2; } #google_map_prop_list_sidebar { order: 1; } .admin-bar #google_map_prop_list_sidebar, .admin-bar #google_map_prop_list_wrapper { […]

Technical: Location of MetaTag Description in Taxonomy Pages

In wprentals-core plugin – file wprentals-core.php you have this WordPress action add_action(‘wp_head’, ‘wpestate_add_custom_meta_to_header’); In the function of this action you have various meta tags for some situation. To remove the description tag for taxonomy just remove the line 293  print ‘<meta name=”description” content=”‘.strip_tags( term_description(”, get_query_var( ‘taxonomy’ ) )).'” >’; Or you can populate the term […]

Technical: Where to change email parameters?

The send email function are in wprentals-core plugin in misc/emailfunctions.php file There are several functions wpestate_select_email_type – which selects the email type wpestate_emails_filter_replace – replaces the placeholders (%invoice ) in content wpestate_send_emails – actually sends email If you look into the theme files for wpestate_select_email_type you will find around 32 occurrences for various scenarios If […]

Tehnical: Random Order for Search Results – Half Map

First of all please be aware that random order can dramatically increase the page loading time – especially when other database queries are made like in advanced search case.  We DO NOT recommend this. If you want to go further – Open property_list_half.php file – at line 133 you have $order_array        = […]

Technical: KML layers to Google Maps

If you wish to add KML layers to Google Maps https://developers.google.com/maps/documentation/javascript/examples/layer-kml The file to edit in Wp Rentals is File path: wprentals/js/google_js/maps_base.js