Enabling Save Recipe Features with Other Plugins

Are you using WP Recipe Maker or another unsupported plugin? You can enable support for Save Recipe simply by editing your master template for your site and pasting this code at the end of the page, before the </body> tag. There are two options — one for the tech-savvy, and the second for those who’d prefer to do it via simpler plugins.

Option 1: Are you a WordPress Developer, comfortable with editing your site template? It’s easy.

You just need to add this script on the recipe detail page. This can be put on the footer of the entire site, or onto the end of a post detail page.

The code above assumes that jQuery is loaded somewhere earlier on the page. If it’s not, insert this in right after the <head> tag on your page:

Notes:

In the first code block above, the Save button is going to be appended into the HTML document element that carries the class “wprm-recipe-buttons”. (That’s the default for the plugin WP Recipe Maker.)

You can easily change the save target location by changing that class, and adding, somewhere on your page, an element to display. For instance, place this where you want the Save button to appear (on your recipe detail pages, or ideally the page template that is used to render your recipe pages.)

Then, instead of this particular line in the big code block above:

use this line instead:

If you’d prefer to do this more from end-user plugin tools:

Option 2: You can install a “code rendering” plugin, then add our code.

Here are the quick steps:

  1. Sign into your WordPress Administrator Dashboard
  2. Add a “code insertion” plugin, such as Q2W3 Code Insert Manager (it’s free), and activate it.
  3. Then, tell the plugin to play the snippet below at the end of every content page.
  4. In Q2W3 Code Insert Manager, that’s done as follows:
  5. Click on “Code Insert” > “Inserts” > “Add New”
  6. Give it a name (e.g., Save Recipe Button)
  7. Pages: Choose to fire on ALL PAGES
  8. Location: Choose to fire AFTER PAGE CONTENT
  9. Paste in the text below — after changing the “.wprm-recipe-buttons” text below to the class name of an element on your page where you’d like the button. If you want the save button to follow your recipe’s title, and if that recipe title is marked with an <H1> tag, for instance, you can simply change the wprm-recipe-buttons line to
  10. Activate the code snippet!

The code above assumes you already have jQuery included on your site’s main template. If it’s not, insert this in right after the <head> tag on your page:

Leave a Reply