Making pod for adding recipes
July 19, 2012 at 4:17 am #168051
I thought I saw previously an option to add more of the same field. For instance, ingredients. Is there a way to give each ingredient its own field, optional to add another ingredient? Some of the recipe plugins have such options. Is that a pick?
NofiaJuly 23, 2012 at 4:23 pm #168066
I’d set things up with a Pod for “ingredient” and a Pod for “recipe”. Each ingredient item describes a single ingredient. Your recipe Pod would have an “ingredients” field: column type “Relationship (pick)”, related to “ingredient”, and check the multi-select box (recipes can have one or more ingredients). In the back end, your recipe items will then have a mult-select box with all the existing ingredients.July 24, 2012 at 5:47 am #168069
So for any multiple fields such as steps of instructions, photos, etc, they all need their own pods.
Thank you for your help. Your answer was simple and clear.July 24, 2012 at 5:49 am #168070
Actually, that is going to help with indexing the site, no? Because on many cooking sites, a user can look up recipes according to ingredients. makes good sense and also probably helps with SEO.July 24, 2012 at 8:10 am #168074
How will the pick work on a public form page?July 24, 2012 at 5:00 pm #168076
“So for any multiple fields such as steps of instructions, photos, etc, they all need their own pods.”
I don’t think I would go that route with the instructions. Probably best to just have a paragraph field for instructions in the recipe pod and enter your images and content into that field the same way you would in a regular post or page. I don’t immediately see much of a need to break that out into a separate Pod since 1) you’re unlikely to be able to reuse most single instructions elsewhere, and 2) the list is likely to grow quite large.
Ingredients could be implemented the same way if you want. Instead of creating an ingredient Pod you could just make the ingredient list a regular paragraph field and list all the ingredients for the recipe there and keep it simple. The usefulness of having them in their own Pod would show up if you wanted to link individual ingredients on a recipe page to find more recipes that use that ingredient. If you don’t think you’ll bother doing anything that fancy then you could bypass breaking them out separately.
Including Pods results in your WP search would mean writing extra code to search your Pods, so it doesn’t matter much which way you implemented ingredients. You can search through an ingredient Pod or search through an ingredient list field in a recipe Pod with roughly the same about of work, you’d just go about it differently.
Search engines don’t care one bit about your data structures, all they do is index the resulting page output. So, ingredients appear on a page and they’ll be seen by the index bot… regardless of the method used to display them behind the scenes.
“How will the pick work on a public form page?”
I’m afraid I don’t understand this last question.August 2, 2012 at 8:45 am #168111
I’m not getting your pick idea to work. How will it work if they ingredients don’t exist somewhere as a list?August 2, 2012 at 6:37 pm #168112
Do you have a URL to preview what you have? Simply saying you aren’t getting it to work gives no clues as to what you might be doing wrong.August 3, 2012 at 4:57 am #168114
I got what you said to work, with the two pod, but if I use different fields for amount, ingredient name then only the ingredient name shows up in the list.
But I tried something else with one of the helpers that didn’t work..to input nonexistent ingredients as choices. That’s the issue. The other issue is consistent formatting… meaning, having choices for measurement instruments in the form of a drop down menu. (cup, teaspoon, tablespoon, etc).
Anyhow, I got most of it in there, the choices I want, formatted according to schema.org, so that’s all good. i can make you a separate pw for the site if you want to see what I’m doing.
My other quandary is getting the recipes added to show up in a members’ buddypress feed and also give them the choice to post the recipe to their own blog as well as to the site database. that’s advanced php that I have no idea how to do.
NofiaAugust 3, 2012 at 5:01 am #168115
as an addendum, having the ingredient name in the lit isn’t a bad thing, without the amount, it’s just that it takes up a lot of room on the page for the box. It would probably be better to have it show up as a dropdown menu, and also, people need to be able to add new ingredients without having to go to another page.
send me an email to admin @ blog my lunch dot com and I’ll make you a pw.
You must be logged in to reply to this topic.