[Plugin: ReciPress] assign to custom post type
You could. It would require a few changes, but nothing too complicated. Here’s a list of lines where you’d need to change “post” to “recipe”, assuming you’ve already set up your recipe post type.
meta_box.php lines 9 and 363
taxonomies.php lines 36,67,98,129,186,187,188,189
In widgets.php after line 102 in the post query $args array, you’d need to add this:
'post_type' => 'recipe',
You shouldn’t lose the recipes you’ve added to posts, either. The output filter will still run over the_content and check for recipe data and output the recipe box if it finds it.
That should pretty much do it. You will lose all your changes if you upgrade with future updates, so just keep that in mind. I also can’t support this, so this is “at your own risk’.
I’m interested on this good plugin too but not tied to posts, should be better to have its own custom post type or option to assign a post type, even if in Pro version.
Assigning it to a custom post type is an option I have considered. I want to focus on some of the more prominent features such as servings adjustments for printing, advanced search, and pro widgets first to really beef up the offering. But I think I will put the CPT on the roadmap since there seems to be a pretty good demand for it.
How RP is conceived by now it’s good for a site focused mainly if not all on recipes but if recipes are only a part of site, finding always a big banner “Want add a recipe to this post” is bothering and space consuming, also it’s difficult to manage when show them. A separate management could be welcomed and burst download/sells, IMO.
Assign to a custom post type that admin create for this, could be the easiest solution (at the end of the day, by now RP works in this manner: add himself to a post type).
Thanks anyway for your work and to share it 😉
Tammy, I’m trying to decide whether to add RP to a chef site. I’ve used other plugins before though haven’t been pleased. Essentially the site has three “food-related” offerings; Articles, Events and Recipes. So, logically I decided to create two additional custom post types; Events and Recipes since both have a common structure and need to use microdata for SEO, i.e. http://www.schema.org/Event and http://www.schema.org/Recipe. Question: does your answer above to @tatamata address the custom post type issue, if I wanted to use a custom post type? Are there any drawbacks from using a custom post type? Thanks for any feedback!
If you have your custom post type registered already, then yes, my instructions above should work.
Pros and Cons to either method really are subjective to each use case. The most common vein of users just need an easy way to manage recipes on their blog, which is why I went the route I did. But if you have a more structured website, then keeping the content separate from the blog would be a good idea. It wouldn’t be too hard to create a supplementary function for calling recipes from a blog post or page according to their ID.
Like I told MacItaly, It’s a good idea, but not something on the forefront of my roadmap right now.
Thanks for the reply. One more question: does ReciPress adhere to microdata as per schema.org? Thanks.
- The topic ‘[Plugin: ReciPress] assign to custom post type’ is closed to new replies.