Form Tags for Recipes

Add a recipe’s ingredients and instructions to WPForms notification emails.

Lauren Gray Avatar

Form Tags for Recipes adds recipe smart tags to WPForms notification emails. When a reader submits a form on a recipe post, the email can include that recipe’s ingredients, instructions or both, pulled from WP Recipe Maker or Tasty Recipes.

Before you start

  • WordPress 5.8.3 or later
  • PHP 5.6 or later
  • WPForms, installed and active
  • WP Recipe Maker or Tasty Recipes, installed and active

If WPForms isn’t active, the tags don’t show up. If neither recipe plugin is active, the tags come out empty.

Install

  1. In your WordPress dashboard, go to Plugins → Add New Plugin.
  2. Click Upload Plugin.
  3. Choose the plugin zip file.
  4. Click Install Now.
  5. Click Activate.

There’s no settings page. The tags show up in WPForms once the plugin is active.

How to use

Add a recipe to a notification email

  1. In WPForms, open the form you want to use and go to its notification settings.
  2. In the email message, open the smart tags list and pick a recipe tag: Recipe Ingredients, Recipe Instructions or Recipe Ingredients & Instructions. You can also type the tag yourself (see the table below).
  3. Save the form.
  4. Embed the form in a post that has a recipe card. The tags read the recipe from the post the form is on.
  5. Submit a test entry and check the email.

Smart tags

  • {recipe_ingredients} (Recipe Ingredients): the ingredients list, under an “Ingredients” heading.
  • {recipe_instructions} (Recipe Instructions): the instructions, under an “Instructions” heading.
  • {recipe} (Recipe Ingredients & Instructions): both, one after the other. With WP Recipe Maker, the recipe name shows up first.

With WP Recipe Maker, instruction images show up at medium size.

Developer reference

Coming soon: the hooks, filters and functions you can use with this plugin from your theme or a code snippet.

FAQs

What if the post has more than one recipe?

With Tasty Recipes, the tags use the first recipe in the post.

What happens if the form isn’t on a recipe post?

The tag is removed from the email, so readers don’t see a stray {recipe}. They just won’t get any recipe content.

Does it work with Gravity Forms or Ninja Forms?

No. The current version only adds tags to WPForms.