View Categories

WPRM for Developers

11 Docs

The Recipe Post Type

Last Updated: December 5, 2024

Recipes are stored in your WordPress database as a custom post type called wprm_recipe By default, this is not a public post type, but recipes rather exist as part of a so-called “parent post”. The parent post is the one with the URL and the recipe is just a part of it. You can learn...

Recipe Shortcodes

Last Updated: December 5, 2024

Recipe Shortcode While we recommend using the interface to add recipes, you can also display it directly using the recipe shortcode. Display a recipe with a specific ID Display a random recipe Display a specific recipe in a specific template (only when using modern template mode) Feature Shortcodes Some features have their own shortcode. Add...

Access recipes in a post via code

Last Updated: December 5, 2024

The following code can be used to find recipes in the current post (when in the loop): Not in the loop? Use the following code to specify the post ID to get the recipes from: Or get all recipes inside a piece of content:

Show default WordPress UI for taxonomies

Last Updated: December 5, 2024

For some advanced uses or combining with other plugins you might want to see the classic WordPress UI for your taxonomies like you do for regular categories and tags associated with posts. This is possible by enabling the “Show default WordPress UI” setting on the WP Recipe Maker > Settings > Post Type & Taxonomies page:...

Using the Recipe Object for front-end changes

Last Updated: December 5, 2024

As of version 9.5.0 there is an easy way to dynamically alter the recipe in the front-end through the recipe object. This can be used to create your own adjustable servings UI, for example. Accessing the Recipe Using JavaScript, you have the WPRecipeMaker.manager object available. It can be used to find all recipes on the...

Plugin hooks and filters

Last Updated: December 5, 2024

Plugin hooks can be used to alter the plugin functionality or output without directly editing the plugin files (you should not do that, as those changes will get overwritten on update). This is for advanced users who are comfortable with PHP only. Block Shortcode Hooks Block shortcodes are used in our Modern Templates to output...

WordPress REST API

Last Updated: December 5, 2024

Recipes are a custom post type called wprm_recipe with regular taxonomies and custom fields associated with it. Because of that, they are accessible to the default WordPress endpoints for post types and taxonomies. You can learn more in the WordPress REST API Handbook. Recipes in the REST API Recipes are accessible through the WordPress REST...

Custom Recipe Importer

Last Updated: December 4, 2024

We offer an import mechanism for quite a few recipe plugins but some websites have their own custom recipe solution. Those cases will require a custom recipe importer. You can create your own importer starting from this example custom recipe importer code. When completed, place it in the /wp-recipe-maker/includes/admin/import/ folder and it should automatically be recognized...

How themes can style WP Recipe Maker

Last Updated: December 5, 2024

Want to recommend WP Recipe Maker as the recipe plugin to use with your recipe theme? Great idea! We try to make it as easy as possible for themes to apply their own styling to our recipe cards and end up with a beautiful combination and style. What not to do We see some themes...

Create your own template

Last Updated: December 5, 2024

For most users, we highly recommend using the built-in Template Editor to create your own templates. It gives you an easy interface for editing all blocks and you have the ability to edit HTML and CSS directly as well. Advanced users can also create their own template files like this: Creating a Custom Template in...

Adding your own SVG icons for the Template Editor

Last Updated: December 5, 2024

The plugin includes a set of royalty-free icons that can be used for any icon in the Template Editor. If you want to extend this list of icons you can create a folder named “wprm-icons” in your (child) theme. Any SVG file put in that folder will automatically get picked up by the Template Editor....