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 show sidebar in owner page with no reviews

To enable sidebar for owner pages that doesn’t have reviews must comment highlighted code in owner_details_header.php and agent_reviews.php files as displayed in below screenshots:  

Technical: Make payments recurring by default

How to make the recurring box for membership recurring “Checked” by default In wprentals\user_dashboard_packs.php file at line 65 you have input type=”checkbox” name=”pack_recuring” id=”pack_recuring” value=”1″ replace that with input checked type=”checkbox” name=”pack_recuring” id=”pack_recuring” value=”1″ How to hide Recurring box for membership submission #pack_recuring { display: none; } [for=”pack_recuring”] { display: none!important; }

Technical: How to limit calendar in booking form

  To limit the number of months on the booking form from the property page you must do the following In js/property.js file Look for the function check_in_out_enable2 (should be around line 150) and add this piece of code  – replace 3 with your number of Months var futureMonth = moment(today).add(3, ‘M’); The above code […]

Formulas used in WpRentals Invoices

Formulas used: total = (inter price + expenses + manual_expense ) – early bird + city fee+ cleaning fee + sec deposit $early_bird_discount – doesn’t include extra guest, security, city fee, cleaning fee $you_earn = $total_price – $security_deposit – floatval($city_fee) – floatval($cleaning_fee) – $service_fee; $taxes = round ( $you_earn * $taxes_value/100,2); $price_for_service_fee = $total_price – $security_deposit […]

Hide Property ID from Property Page

Property ID can be hidden with css. This value is assigned automatically by wordpress and it’s a unique number. .list_detail_prop_id{ display:none; } You can add this in Design – Custom Colors – Custom CSS Before adding this css the property page includes Property ID After this css is added, Property ID doesn’t show

How to change the numbers in dropdowns for bathrooms, rooms and bedrooms

Half Map Search File path wprentals/classes/rentalsSearch.php This changes value for all dropdowns (r0oms, bedrooms,  bathrooms) If you wish different values for each dropdown you must add new code as in this example and than change the value to the one you wish for each field Search type and type 2 Change 15 with your chosen […]

Facebook SDK returned an error: Cross-site request forgery validation failed. Required param “state” missing.

If you get this error when using Facebook login Facebook SDK returned an error: Cross-site request forgery validation failed. Required param “state” missing. Add the following to functions.php in the child theme: add_action(‘init’, function() { session_start(); if ( isset( $_GET[‘state’] ) ) { $_SESSION[‘FBRLH_state’]=sanitize_text_field($_GET[‘state’]); } }); NOTE: this situation is specific to domain setup (if […]

Image is not showing on Safari browser.

Safari browser is sensitive to the images that contain special characters like ” or ç. This is related to a safari limitation. Only ASCII characters are allowed in URLs in Safari – IOS, and that does not include accented characters. Because of this limitation, if an image has accented characters in url, it will not […]

How to hide the categories number in advanced search dropdown

If you want to remove that information you need to remove (‘.$counter.’) from all places from wprentals/libs/help_functions.php file. For half map, search type 3 and 4 must make the same change on wprentals\libs\search_functions3.php and wprentals\libs\search_functions4.php

Parse error: syntax error, unexpected ‘[‘, expecting ‘)

If you get this error when activating the theme Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in wprentals/libs/ajax_functions.php on line 3274 The line comes from Facebook login. Facebook API was updated in version 1.17 because starting August the old facebook API is no longer be used. The new API requires a specific PHP version. […]

Facebook Share doesn’t share image or text. What to do.

On some servers Facebook cannot access the info from a property from first share attempt. This is related to Facebook not being able to get the data from your server. How to verify this applies for your situation. Go to https://developers.facebook.com/tools/debug/sharing If you use Open Graph Object Debugger you will see an error message like this: Error parsing […]

How to enable wordpress comments on property page

To enable wordpress comments on the property page, you need to do the following locate the property template file. For example, for page design type 1, the file is at “templates/property_page_templates/listing_page_1.php “. For the rest of the templates, the files are in the same folders and are named accordingly. In the template file, locate the […]

How to add new fields in the user profile

1. You need to add the html element for the new filed To add a new field you need to edit the templates/user_profile.php file. Add the new html element but also make sure you retrieve the information in the page header (will be used to fill up the form if is anything saved ). For […]

Technical: How to show owner social details for all users

Owner social details can be seen only by logged users that have a confirmed booking for one of owner’s properties. To show social details to all users (registered or not) remove the highlighted code  from wprentals/templates/owner_details_header.php file  

How to make mobile advanced search open by default

To make mobile search open by default add this css in Theme options – Design – Custom css @media only screen and (max-width: 768px){ #adv-search-mobile { display: block!important; } } Result:

Technical: Booking explained

The actual booking is made via ajax. When you push the “book now” button a JavaScript event is triggered and a series of checks is started. the click event is in property.js around line 300 $(‘#submit_booking_front’).click(function (event) { event.preventDefault(); var guest_number, guest_overload,guestfromone,max_guest; if (!check_booking_form() || booking_error === 1) { return; } ……. If all the […]