The problem: this is a site for a single hostel (1 more in one year in other location, same owner) and needs to manage accommodation by bunk bed and days. They have daily package and weekly packages and if we could have the search filter with tags instead of Stars filter, for example, to filter the daily or weekly packages, it would be great.
To change the search widget in order to add tags, you can copy includes/plugins/widgets/widget-search.php to your child theme (same folder structure), edit the file and then look at how show_accommodation_type_filter is done and do the same for tag.
This is a good idea, but doesn't work, always show all the accommodations :(.
I also tried to make a new taxonomy accommodation_period to maintain the accommodation tags in acc_tag, but it's the same, selecting only one off the options returns all the accommodations. I changed the taxonomy.php to include
The input parameters in the search widget have to be called "accommodation_tags" as in <input name="accommodation_tags[]" /> in order for this to be picked up by custom-search-results.php which actually displays the results.
The problem: this is a site for a single hostel (1 more in one year in other location, same owner) and needs to manage accommodation by bunk bed and days. They have daily package and weekly packages and if we could have the search filter with tags instead of Stars filter, for example, to filter the daily or weekly packages, it would be great.
It is possible?
What I need to change in the widget?
Thanks in advance
Hi,
To change the search widget in order to add tags, you can copy includes/plugins/widgets/widget-search.php to your child theme (same folder structure), edit the file and then look at how show_accommodation_type_filter is done and do the same for tag.
Best regards,
themeenergy support
This is a good idea, but doesn't work, always show all the accommodations :(.
I also tried to make a new taxonomy accommodation_period to maintain the accommodation tags in acc_tag, but it's the same, selecting only one off the options returns all the accommodations. I changed the taxonomy.php to include
if ($taxonomy == 'accommodation_period' || $taxonomy == 'accommodation_tag') {
$template_part = 'includes/parts/accommodation';
Anyway, can I change the monthly period to 15 days?
They have only weekly and 2 weeks packages, and I need to select 2 weeks without duplicate the price.
Hi,
The input parameters in the search widget have to be called "accommodation_tags" as in <input name="accommodation_tags[]" /> in order for this to be picked up by custom-search-results.php which actually displays the results.
Best regards,
themeenergy support
Ok, for the second question related with 2 weeks, I found the solution, it's just select a minimum of 2 weeks stay
Great to hear, thanks.
Best regards,
themeenergy support