I am trying to design a cooking website with the idea that a user can select the available ingredients in their home and the system shows the recipes which only include the ingredients they selected.

As an example, if we have 4 Ingredients (A~D), and the user selected B & C as available ingredients, the system shows the recipes which only include the B, C or both of them, and if they have any other ingredient, the system does not show them. Or show them at the bottom of the list sorted by the least missing ingredients first.

I am using WordPress, and tried a couple of recipe making plugins such as WP-Recipe Maker, WP-Ultimate Recipe, and so on, which they are excellent on defining the recipes and ingredients, however, not good for filtering.

I tried couple of filtering Plugins for TAGs and Categories. However, they are working on the AND/OR basis which at the best are able to filter the recipes which includes all of the selected ingredients or show the recipes which may include one or more of the selected ingredients, but won't filter the one which may have all, but also does includes something more.

I also tried WooCommerce and relevant filtering plugins such as woof, again, it is the same problem, it will show all the recipes which include the one or more of the selected ingredients (attributes) while does not filter the recipes having more.

Thanks for your kind help and support friends.

Best Regards.

  • Do you have the ability to create your own template in the theme you're using so that you can write your own Query filters? – Tony Djukic Mar 24 at 15:13
  • It's not clear what you're asking here, I understand your problem, but this isn't a discussion forum. Are you asking how to query for posts that only have those terms and no others? Are you asking for a plugin recommendation? ( if so plugin recommendations are offtopic, your Q would be closed ) Or are you just looking for best practices? You need to be able to state clearly a specific question that can be factually answered in a concrete manner ( for all people, not just your specific case ) – Tom J Nowell Mar 24 at 15:23
  • This will be a very useful site! It sounds like the recipe plugins you've tried have set things up as they need to be, with custom post types and taxonomies/categories, and what you can focus on now is search. There are search plugins available that you can try, or you can try your hand at creating the form and custom queries required to let people use checkboxes for ingredients and query for the recipes that have just those ingredients. I would check in the database to see how your plugin has set things up - is it using Categories or custom taxonomy? - and that will help you set up search. – WebElaine Mar 24 at 15:49
  • Dear Tony, Thanks for the answer. I know a little access database. However, i do not know how to do it in wordpress. Either by programming or so on. So, helping you as experts and friends would be highly appreciated. – MFB Mar 24 at 15:55
  • Dear Tom, Thanks for the answer. I am not contributing any plugin. Just tried to explain what did i do till now to clarify the situation. Your help and support would be appreciated to guide me to find the best way. – MFB Mar 24 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.