WordPress.org

Ready to get started?Download WordPress

Forums

How to build a recipe "template" for users to contribute their own? (6 posts)

  1. lamenramen
    Member
    Posted 2 years ago #

    Hello,

    Could someone please help me with my following use case? It should be dead simple to do, but I don't know how, and I'm wondering why I'm finding it so hard.

    I simply want to create recipe template that users can access to add their own recipes to my wordpress site.

    A recipe should be simple and have 3 sections: a name, an ingredients section, and a directions section. That's it.

    How would I begin to accomplish this?

    To show that I've been trying, I have downloaded advanced custom fields and also custom post types UI. First, are those the right plugins for the job?

    I made a custom post type and called it "recipes". I assume that I need to use advanced custom fields to attach a name, ingredients, and directions field to the custom post type named "recipe".

    I failed to do the "attaching". Also, where would I move this recipe object so that users can add a recipe? I can see "add recipes" in the admin, but I don't want to do the adding. I want a user to do that.

    Thanks!

  2. Obadiah
    Member
    Posted 2 years ago #

  3. lamenramen
    Member
    Posted 2 years ago #

    Thanks for the links.
    I read them and am still not sure. I would request a link to a fully working example that doesn't leave anything out. Not ready to drop $40 on a plugin yet.

    I have built a custom-post-type called "recipe". To me, a custom post type has nothing but a label and some properties about its visiblity. I had thought that it would be like a Class in object oriented programming that you can define fields on. But no, it's essentially an empty Class.
    You've got to attach custom fields to it for a custom post type to be useful it seems.
    I made some custom fields called "ingredient" and "directions".

    --how do I attach these fields to a recipe custom post type? I still see no way to make a recipe template, save that template, and then show that template to site visitors. Seems pretty basic, so I don't know what isn't clicking for me. What site visitors should see is nothing more than 3 textboxes: title, ingredients, and directions. What I'm seeing is all kinds of stuff like comments, discussions, trackbacks, etc. It looks like a blog post.

    Thanks

  4. lamenramen
    Member
    Posted 2 years ago #

    Yeah, so wordpress is not a content management system that requires no coding after all, at least using free plugins.

    Gravity forms and types & views look to give wordpress CMS functionality, but this is available in Drupal for free.

    I realized that to make something as simple as a database of Books, where users can add a Book, browse all books by author, date, year, etc, is not possible with wordpress--at least not out of the box. I'm sure that it's easy as pie for real developers, but in case anyone cares, for a newbie--

    You can make a Book custom post type.
    You can add custom fields (author, year, publisher).
    You can add custom fields to the Book custom post type, but you can't get rid of the Titlte and Content Editor elements. So it's just odd.
    Then it's not apparent, at all, how to let users browse the books by each field (something that the $49 types & views probably allows).
    I do realize that you can do all that I say if you are willing to muck around with the PHP code, which is all fine and dandy.

    But to know what you're doing, you've got to read the background of what the wordpress API does, etc. You have to learn what the hooks are, what the templating system is, etc. Again, all fine and dandy, but I submit that such an incredibly common, simple, and standard CMS feature should not require manual PHP coding. It could very well be the case that I have missed complete tutorials that are on the net that tell you how to build a Books database using WordPress 3.3.1 from scratch. They might tell you how to build a Book custom post type, but after that, then what? Every single tutorial that I've seen so far is missing a few key steps or are geared towards those who already know the innards of WordPress. People get lost at different places, and what is obvious to some is not at all obvious to others, and the only way to solve this problem when writing a tutorial is to include all the steps, or at least include a sample project.

    Maybe I expected too much, but I'm shocked that such a large project has no good resources on how to accomplish such a common use case. Maybe Drupal is no better, but we'll see. I might be back.

  5. Mike Rodriguez
    Member
    Posted 2 years ago #

    Advanced Custom Fields + Custom Post Types can do the job. ACF supports front end forms now, so you can easily allow users to submitted or contribute by allowing them to post specified to the custom post type you created.

  6. tr.sa.buis
    Member
    Posted 1 year ago #

    Did you ever figure out how to have people post their own recipes? I'm trying to do the same thing and would love to hear how you did it if you were successful.

Topic Closed

This topic has been closed to new replies.

About this Topic