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

Remove availability calendar from property page

To remove availability calendar from property page use below CSS: .check_avalability { display: none!important; } h3#listing_calendar { display: none; } .all-front-calendars { display: none; } Remove from menu: .property_menu_item:nth-of-type(5) { display: none; } Remove Hourly Calendar #all-front-calendars_per_hour { display: none; } .property_page_container { display: none; } .property_page_container.google_map_type1 { display: inherit; }

Remove menu labels in property submenu

Those labels can be removed from \templates\property_menu_hidden.php file. Or can remove it using custom css as explained in this help: https://help.wprentals.org/article/how-to-remove-menu-items-from-property-page-with-custom-css/

Technical: Change language for Google Places suggestion on the search form

The Google Places suggestion on the search form is blocked on the English language. If you want to change the language you need to edit the: – wprentals/libs/css_js_include_helper.php at line 18 and  – wprentals/libs/css_js_include ~ line 994. You have there this code if( intval( wprentals_get_option(‘wp_estate_kind_of_places’) ) == 1 ){ $libraries =’&libraries=places&language=en’; } You have to change the language=en […]

Technical how to: Register and Login

The login and register functions are made via Ajax. This means an event is triggered in JavaScript, and a register/login PHP function is called inside this function event. This function will return the result to the javascript, where we will redirect the user to his profile page or we will display other relevant information. For […]

Technical how to: contact form

The contact form is displayed inside a modal window and displayed on the page via ajax. The php function that actualy contains the contact form is function wpestate_ajax_show_contact_owner_form() in ajax_functions.php at line 962 . If you want to add or change anything this is the place where you work with the html code. The send […]

Disable Fancybox script on property pages

If you want to disable the fancybox gallery script on property pages you need to go into control.js and at line 2115 you have this code that needs to be removed $(“.fancybox-thumb”).lazyload(); $(“.fancybox-thumb”).fancybox({ prevEffect : ‘none’, nextEffect : ‘none’, helpers : { title : { type: ‘outside’ }, thumbs : { width : 100, height […]

How to remove “view more” and show full description

In the property page, if you want to show the full description and remove the view more link you need to use this css code. #listing_description .panel-body { max-height: 100%!important; } #view_more_desc{ display:none!important; } You can add it in theme-options/design custom css filed or in the style file on your child theme.

Technical how to: Property Reviews explained

Adding a review. After the booking period has passed(the user that rent the property stay in that property) a “Post review ” button will appear on the properties listed in “My Reservation” page. The html code for this button is located in book-listing-user-unit.php if(strtotime($booking_to_date) < time() ){ if ( get_post_meta($booking_id,’review_by_’.$userID,true) != ‘has’ ){ print ‘<span […]

Technical: Calendar warnings

Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (first day of next month) at position 10 (o): The timezone could not be found in the database in … Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (first day of next month) at position 10 (o): The timezone could not be found in the database in […]

Technical how to: Advanced search explained

The search functionality is divided into two primary types, with results processed and displayed using the WP_Query function. Search Type 1 & Type 2 are located in advanced_search_type1.php and advanced_search_type2.php, these search types send parameters to advanced_search_results.php for processing. If you want to add new search fields or change the existing ones you should start […]

Technical how to: add custom fields for messages

The contact message window (pop up  or modal) is opened via javascript when you push the contact button . The code is in property.js at line 170 $(‘#contact_host,#contact_me_long’).click(function () { var booking_id, agent_id; agent_id = 0; booking_id = $(this).attr(‘data-postid’); wpestate_show_contact_owner_form(booking_id, agent_id); }); The javascript click event is calling another javascript function that is located in […]

How to add a Google font

UPDATE: a client confirmed this plugin works to change font  https://wordpress.org/plugins/easy-google-fonts/ — In a child theme functions.php add the following code add_action(‘wp_enqueue_scripts’, ‘wpestate_scripts_childtheme’); function wpestate_scripts_childtheme() { $protocol = is_ssl() ? ‘https’ : ‘http’; wp_enqueue_style( ‘wpestate-railway’, “$protocol://fonts.googleapis.com/css?family=Raleway:500,600,400,700,800&amp;subset=latin,latin-ext” ); } Now, you need to replace the raleway font in the above  example with your font(including in ‘wpestate-railway’ ). […]

Technical how to : change the header links on property submission page

The link that are in the header when you add or edit a property page can be changed/removed by editing the submission_guite.php in templates folder/ At line 72 you have the html code for the link <div class=” user_dashboard_panel_guide”> <a href=”<?php echo $edit_link_desc; ?>” class=”<?php echo $activeedit; ?>”><?php esc_html_e(‘Description ‘,’wpestate’);?></a> <a href=”<?php echo $edit_link_price; ?>” […]

Technical how to : User menu

In WPRentals there are 2 types of user menus : 1.The one that appears on header bar , when you click the user picture. This menu is located in templates/user_menu.php some explanations : if the page is a listing edit property  we show additional links : description, price, images…. if ( isset($_GET[‘listing_edit’] ) && is_numeric($_GET[‘listing_edit’])) […]

Technical how to : change property page details

The property page is displayed using the single-estate_property.php file. For the property page you have two design types that can be set in theme options -> appearance ->Property Page Design Type The loading of the different template is made at line 128 . ***listing_page_2.php is the file with the full wide slider image . $listing_page_type = […]