With the Jump to Recipe and Print Recipe shortcodes you can add convenient quick access links at the top of your posts like this:
The shortcodes can be added by using the shortcode editor by clicking on the WP Ultimate Recipe icon:
Another option is to just type the [ultimate-recipe-jump] and [ultimate-recipe-print] shortcodes yourself.
If you want these buttons to automatically appear on top of every recipe post, you can also add the following code to your theme’s functions.php file:
function wpurp_auto_add_snippets( $content ) {
if ( is_singular( 'recipe' ) ) { // Only output on single recipes, not in the archive.
$print_shortcode = 'ultimate-recipe-print';
$jump_shortcode = 'ultimate-recipe-jump';
$snippets = '<div class="wpurp-recipe-snippets">[' . $print_shortcode .'] [' . $jump_shortcode . ']</div>';
$content = do_shortcode( $snippets ) . $content;
}
return $content;
}
add_filter( 'the_content', 'wpurp_auto_add_snippets', 20 );
This is the recipe you should be jumping to when clicking the example link on top:
Prep Time | 5 minutes |
Cook Time | 15 minutes |
Servings |
people
|
- 200 g tagliatelle
- 200 g bacon tiny strips
- 1 clove garlic
- 12.5 g pine kernels
- 50 g basil leaves
- 6.25 cl olive oil extra virgin
- 27.5 g Parmesan cheese freshly grated
Ingredients
Fresh Pesto
|
- We'll be using a food processor to make the pesto. Put the garlic, pine kernels and some salt in there and process briefly.
- Add the basil leaves (but keep some for the presentation) and blend to a green paste.
- While processing, gradually add the olive oil and finally add the Parmesan cheese.
- Bring a pot of salted water to the boil and cook your 200g tagliatelle al dente.
- Use the cooking time of the pasta to sauté your bacon strips.
- After about 8 to 10 minutes, the pasta should be done. Drain it and put it back in the pot to mix it with the pesto.
- Present the dish with some fresh basil leaves on top.
This section can be used for anything you want:
- Chef's notes
- Recipe source
- Allergy information
- Links
- ...
Or just leave it empty, and it will not appear!