In this part of documentation, a detailed look at the article with the recipe. The page with recipe looks different than other article pages (Figure 6.6).
Since we are going to need them to make recipe looks good. Here's a list of necessary shortcodes:
[ingredients]...recipe ingredients..[/ingredients] - seperate recipe ingredients from other content.[directions]...recipe directions..[/directions] - seperate recipe directions from other content.[license-url]URL[/license-url] - to determine the link where the recipe was taken. Example of using shortcode in article content:
Ingredients [ingredients] 2 Tbsp olive oil 1/2 medium onion, finely chopped 1 small carrot or 1/2 large carrot, finely chopped 1 small stalk of celery, including the green tops, finely chopped 2 Tbsp chopped fresh parsley 1 clove garlic, minced 1/2 teaspoon dried basil or 2 Tbsp chopped fresh basil 1 3/4 pound of fresh Brandywine Tomatoes, peeled, seeded, and chopped 1 teaspoon tomato paste Salt and freshly ground black pepper to taste [/ingredients] Directions [directions] Heat olive oil in a large wide skillet in medium heat. Add the chopped onion, carrot, celery and parsley. Stir to coat. Reduce the heat to low, cover the skillet and cook for 15 to 20 minutes, stirring occasionally until the vegetables are softened and cooked through. Remove cover and add the minced garlic. Increase the heat to medium high. Cook for garlic for 30 seconds. Add the tomatoes, including the juice and shredding them with your fingers if you are using canned whole tomatoes. Add the tomato paste and the basil. Season with salt and pepper to taste. Bring to a low simmer, reduce the heat to low and cook, uncovered until thickened, about 15 minutes. If you want you can push the sauce through a food mill, or blend it with an immersion blender, to give it a smooth consistency. [/directions] Thanks [license-url]simplyrecipes.com[/license-url] for recipe
Another special ingredient, you need in making your recipe work, is a tag. Tags are meant to bind specific product with particular recipe. It is their main purpose for the recipes in Foodly theme. Articles with recipes should have tags exactly the same as product titles. Just a heads up, if you are not familiar with tags yet please catch up on this reading product section of this paper.
For example, Foodly theme has a product with a title "Campari Tomatoes". And we want to bind this product with a recipe "Basic Tomato Sauce". To do this, we add the following tags in the article: campari, tomatoes. After these actions, we will get the special recipe on the product page (Figure 6.7).