WordPress. Filter sorting recipes by ingredient.

Started by SIROTA, Aug 18, 2022, 09:28 AM

Previous topic - Next topic

SIROTATopic starter

Hi folks, how do I implement a filter on Wordpress to sort cooking recipes by ingredients.

For example, I want to cook with what I have, and only add the missing ingredients. I specify the ingredients I want and the recipes are sorted by the specified ingredients.
  •  

-DM-

How are tags not suitable for such purposes? For example, "Olivier salad recipe," and in the tags you specify the components, mayonnaise, there, peas, boiled sausage... and so on.

Or through a text search, then the tags manually will not need to fill the recipes, but you need to manually enter when you search (and normalize).
  •  

SIROTATopic starter

It's not convenient via search. You can only search by one ingredient and you end up with lots of recipes. And the filter, - you can specify multiple ingredients until the search is reduced to a few recipes. Something like that in online stores. Except how do you implement that?
  •  

Ronny

Quote from: SIROTA on Aug 18, 2022, 10:51 AMExcept how do you implement that?

You can implement such a filter through arbitrary fields (ACF), create a list of properties, then put a plugin to filter by arbitrary fields. I can make a handler if you can't find a filter.
  •  

SIROTATopic starter

Quote from: -DM- on Aug 18, 2022, 09:55 AMHow are tags not suitable for such purposes?

Tags aren't exactly the coat of arms. Tags are convenient to search by one word. For example, find all recipes that use peas. What if you need to find all recipes that have both peas and some other ingredient?
  •  

-DM-

Quote from: SIROTA on Aug 18, 2022, 12:01 PMWhat if you need to find all recipes that have both peas and some other ingredient?

And this is the nuances of how to use tags.
You can use the checkbox to select more than one. You type a question into Google and get an immediate answer http://wordpress.org/plugins/search-everything/.
  •  

SIROTATopic starter

Quote from: -DM- on Aug 18, 2022, 01:40 PMYou type a question into Google and get an immediate answer

Great idea, but This plugin has not been tested with the last four key WordPress releases . Most likely no longer supported, very likely compatibility issues when used with later versions of WordPress.
  •