It works thanks! Great feature! It was needed and very useful.
Hey there. How did you get this to work? When I search any random date range, I always get “nothing found” on the search results page. I cannot understand the solution provided by @ihor about re-saving one of the listings
It will work with all new listings. For all existing listings you have to go to backend and update the listing, then it should be found on date search.
Thanks for your reply. I have over 1000 existing listings already. Is there absolutely no way to update them without having to manually update every single listing? Thanks.
Please try this PHP code snippet to re-save all listings. Please refresh any page on your website to start this code snippet. Then please delete this code snippet after using it.
add_action(
'template_redirect',
function(){
$listings = \HivePress\Models\Listing::query()->get();
foreach($listings as $listing){
$listing->save();
}
},
1000
);
Thanks for the help @yevhen Unfortunately, the code does not work on my site. When I add the snippet and refresh my page website, it takes about 4 minutes refreshing and then delivers a 503 error message. So basically, the website does not load when the snippet is activated.
Please try this PHP code snippet instead. It will take 100 listings on each page to refresh and re-save them. You can change the number 100 to another number to re-save more listings on each page refresh but it depends on your server’s possibility.
add_action(
'template_redirect',
function(){
$listings = \HivePress\Models\Listing::query()->order(['modified_date' => 'asc'])->limit(100)->get();
foreach($listings as $listing){
$listing->save();
}
},
1000
);
Did yours ever get to work? Now for some reason mine is no longer showing up on date search. “nothing found” coming up on listings.
Sim! Para mim também aparece isso: “nothing found” …
Please make sure that the Enable time slots setting in HivePress/Settings/Bookingsn is enabled
Also, please also check that the multiple bookings per time periods option is un-checked, it’s still not supported for the availability search.
@aqmiami7 @NicoleVedovatto53 Please try to re-save one of the listings, there’s a new function that saves the max number of slots per day for listings, and this number is used to determine if any free time slots are left for the searched dates.
If the issue persists, then please send temporary WP access to support@hivepress.io with details for reproducing this issue, and we’ll check it. You can create a temporary access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org