1. Home
  2. Knowledge Base
  3. Tasty Recipes
  4. Customizing Tasty Recipes
  5. Filter: Change “Ingredients” to “Supplies” in Recipe Card
  1. Home
  2. Knowledge Base
  3. Tasty Recipes
  4. Filter: Change “Ingredients” to “Supplies” in Recipe Card

Filter: Change “Ingredients” to “Supplies” in Recipe Card

If you would like to change the Ingredients label in your recipe card to something else, this custom PHP code snippet can do that.

We recommend using a free code snippets plugin like WP Code to add the following code to your site:

PHP
add_filter(
    'render_block',
    function( $output, $block ) {
       if ( 'wp-tasty/tasty-recipe' !== $block['blockName'] ) {
          return $output;
       }
       return str_replace( '<h3 data-tasty-recipes-customization="h3-color.color h3-transform.text-transform">Ingredients</h3>', '<h3>Supplies</h3>', $output );
    },
    10,
    2
);
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support