Hi! I need to create a recipes page and one of the searchable fields should be "Preparation time".
I will need to feature this information on front end in HH:MM format. Together with this, I need to create a search field to filter results depending on "Preparation time". This means that, for example, someone should be able to search recipes that could done between 45min and 1 hour.
My 2 questions here are
1) how to define this "Preparation time" field in Minutes and Hours.
2) how to create a search field with this searchable criteria: "Between 1 and 15 minutes", "Between 15 and 30 minutes", "Between 30 and 45 minutes", "Between 45 and 1hour", "Between 1hour and 2 hours". Understanding that recipes will be filtered
What you will need to do is to have a specific range of checkbox fields where the user can select the time it takes to prepare the meal.
These options would encompass the selections that you will need to filter for.
So for e.g if a Meal takes a preparation time of 15 minutes then the user will select 15 minutes from their checkbox options when creating the post.
On the checkbox field defined in types it would be best to give the user these options "Between 1 and 15 minutes", "Between 15 and 30 minutes", "Between 30 and 45 minutes", "Between 45 and 1hour", "Between 1hour and 2 hours".
Maybe your suggestion can work. I will work on your idea and see how it works.
1- I will create a text custom field "exact-time" to write down the exact time that the recipe will take (just to show in front end)
2- I will create a custom taxonomy "between XX and XX minutes" with the time ranges (this will filter the recipe)
3- In front end I will display the "exact-time" as part of the recipe description, and will use the custom taxonomy "between XX and XX minutes" to filter results.
Thanks a lot!