Getting started

Developer Hooks & Customizations for Recipe Card Blocks

Recipe Card Blocks PRO provides several action hooks that allow developers to inject custom content at various positions within the recipe card.

Available Hooks

You can use the following hooks to add content after specific sections of the recipe card:

  • wpzoom_recipe_card_block_content_after_image – Fires after the recipe image.
  • wpzoom_recipe_card_block_content_after_title – Fires after the recipe title.
  • wpzoom_recipe_card_block_content_after_details – Fires after the recipe details (prep time, cook time, servings, etc.).
  • wpzoom_recipe_card_block_content_after_ingredients – Fires after the ingredients list.
  • wpzoom_recipe_card_block_content_after_directions – Fires after the directions.
  • wpzoom_recipe_card_block_content_after_video – Fires after the recipe video (if available).

Example Usage

To add custom content after the recipe image, use the following snippet in your theme or plugin:

add_action( 'wpzoom_recipe_card_block_content_after_image', function() {
    echo '<p class="custom-note">This is a custom message after the recipe image.</p>';
});

These hooks provide flexibility for developers to extend and customize recipe cards without modifying plugin files.

WP-CLI: Convert Units in bulk

Recipe Card Blocks PRO 7.4.4 adds WP-CLI commands that fill in the US/Metric conversions for all your recipes from the command line. They do the same scan, preview, apply and undo as Recipe Cards → Convert Units: previews are stored, only empty amounts are filled in, and undo restores the last run. Run them as an administrator:

wp rcb unit-conversion scan --user=admin
wp rcb unit-conversion preview --user=admin
wp rcb unit-conversion apply --user=admin --dry-run
wp rcb unit-conversion apply --user=admin
wp rcb unit-conversion undo --user=admin

After Convert Units (or one of these commands) changes a post, it fires wpzoom_rcb_unit_conversion_post_updated with the post ID. The tool saves the content directly, without save_post, so hook in here to purge a page cache:

add_action( 'wpzoom_rcb_unit_conversion_post_updated', function( $post_id ) {
    // Purge the cache for this post.
});

See How to Convert All Your Existing Recipes to Metric or US at Once for every command and option.

Last updated on October 15, 2026