How to Insert Save This Above Your Recipe Card

Want to display the Save This form directly above your recipe card, rather than inside it? This requires a small PHP snippet added to your site. We have snippets ready for both WP Recipe Maker and Tasty Recipes.

💡 Note! Adding the Save This form above your recipe card with this method will not prevent Save This from auto-inserting in your content.

If you don’t want two forms shown on a given post, be sure to uncheck the box for Posts in Hubbub > Save This > Enable Post Types.

WP Recipe Maker #

Add the following snippet to your site to automatically place the Save This form directly above every WP Recipe Maker recipe card.

add_filter( 'the_content', 'nerdpress_save_form_before_recipe_card' );
function nerdpress_save_form_before_recipe_card( $content ) {
    if ( ! is_singular() ) {
        return $content;
    }

    $save_form = do_shortcode( '[hubbub_save_this]' );

    $content = preg_replace(
        '/(<div[^>]+class="[^"]*wprm-recipe-container[^"]*"[^>]*>)/i',
        $save_form . '$1',
        $content,
        1
    );

    return $content;
}

Tasty Recipes #

Add the following snippet to your site to automatically place the Save This form directly above every Tasty Recipes recipe card.

add_filter( 'the_content', 'nerdpress_save_form_before_tasty_recipe_card' );
function nerdpress_save_form_before_tasty_recipe_card( $content ) {
    if ( ! is_singular() ) {
        return $content;
    }

    $save_form = do_shortcode( '[hubbub_save_this]' );

    $content = preg_replace(
        '/(<div[^>]+class="[^"]*tasty-recipes[^"]*"[^>]*>)/i',
        $save_form . '$1',
        $content,
        1
    );

    return $content;
}

How to Add the Snippet to Your Site #

The easiest way to add a snippet to your site is with a code snippets plugin. Two popular free options are WPCode and Code Snippets — instructions for both are below.

WPCode #

  1. In your WordPress dashboard, go to Code Snippets > + Add Snippet.
  2. Choose Add Your Custom Code (New Snippet) and click Use Snippet.
  3. Give the snippet a name you’ll recognize, such as Save This Above Recipe Card.
  4. Set the Code Type to PHP Snippet.
  5. Paste in the snippet for your recipe card plugin.
  6. Under Insertion, make sure it is set to Auto Insert and the location is Run Everywhere (or Frontend Only).
  7. Toggle the snippet to Active and click Save Snippet.

Code Snippets #

  1. In your WordPress dashboard, go to Snippets > Add New.
  2. Give the snippet a name you’ll recognize, such as Save This Above Recipe Card.
  3. Paste in the snippet for your recipe card plugin.
  4. Under Run snippet, select Only run on site front-end.
  5. Click Save Changes and Activate.

Once activated, visit a post with a recipe card to confirm that the Save This form is appearing in the right spot.

If the Save This form isn’t inserting after following these steps, please reach out to support@morehubbub.com, and we would be more than happy to help!

Was this content helpful?

Updated on May 29, 2026