WPRentals Theme Documentation WPRentals Theme Documentation

  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API
Home / Technical how to / Tehnical: Random Order for Search Results – Half Map

Tehnical: Random Order for Search Results – Half Map

7088 views

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        =   wpestate_create_query_order_by_array($order);
- replace $order with 99

The function  wpestate_create_query_order_by_array($order) is located at line 105 in libs\help_functions.php

Also, please note that the results are stored in a transient (cache) –  via the code at line 180 in property_list_half.php file

wpestate_set_transient_cache(  'wpestate_prop_list'.$transient_appendix, $prop_selection, 60*4*4 );

You can adjust the cache duration in seconds by adjusting this value 60*4*4

Technical how to

Related Articles

  • How to Make a Contact Button Open WhatsApp
  • How to add a new currency in Theme Options for payments.
  • How to Disable WordPress Image Compression and Preserve Original Quality
  • How to Change the Default Categories Icon from Listing Card Unit

HELP CATEGORIES

  • 61. General
  • 72. Installation & Basic Setup
  • 373. How Booking Works
  • 18Advanced Search
  • 17Elementor WPRentals Studio
  • 14Email Notifications
  • 27FAQ
  • 14Installation FAQ
  • 10Menu Options
  • 33Owner & Renter
  • 8Page Templates
  • 24Property / Listing
  • 22Shortcodes
  • 4Supported Maps
  • 99Technical how to
  • 5Third Party plugins
  • 4Translation & Multi Languages
  • 3WordPress Blog Post
  • 13WordPress Widgets
  • 12WP Rentals Payments
  • 80WP Rentals Theme Options
  • 26WPML & Weglot

Join Us On

Powered by WP Estate - All Rights Reserved
  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API