Jump to Recipe

This link can easily be added with the [wprm-recipe-jump] shortcode:

Jump to Recipe

It will jump to the very first recipe on the page and is perfect for adding at the very top of your posts for visitors who just want to get to the recipe.

The easiest way to add this shortcode is from the Recipe Snippets section after clicking on the WP Recipe Maker button.

jump-to-recipe-shortcode

 

If you want to include the shortcode on top of every blog post that includes a recipe you could add the following snippet to your theme’s functions.php file:

function wprm_auto_add_snippets( $content ) {
 if ( is_singular( 'post' ) ) { // Only output on single posts, not in the archive.
 $print_shortcode = 'wprm-recipe-print';
 $jump_shortcode = 'wprm-recipe-jump';

 $snippets = '<div class="wprm-recipe-snippets">[' . $print_shortcode .'] [' . $jump_shortcode . ']</div>';
 $content = do_shortcode( $snippets ) . $content;
 }
 return $content;
}
add_filter( 'the_content', 'wprm_auto_add_snippets', 20 );

This can then easily be styled with some CSS.

And this is the recipe you should be jumping to with the example link on top of this page:

sushi
Print

Sushi


Cuisine Japanese

Ingredients

  • rice
  • fish
  • vegetables

Instructions

  1. I've never made sushi before, so I don't have a lot of instructions for you.

  2. Sorry!

Recipe Notes

You should probably find a better recipe.