Yummy Docs

Blocks

What are blocks? #

Blocks are the components for adding content in the new WordPress block editor. This plugin comes with several blocks to insert content via the block editor. You can for example insert a list of recipes as a block.

Blocks are only available if you are using the block editor, not the classic editor. So, basically this plugin requires the block editor!

How to add blocks? #

Click the Add block button. Search for 'yummy' or scroll to the end of the blocks popup. You can also start writing on a paragraph block "/yum" and all the blocks from this plugin will be listed on the popup.

More information at WordPress.org: Adding a new block

Block options #

Once you have added a block, you will see what options are available for the block. You can find the options in the editor sidebar in the Block tab. It should be activate automatically when you add the block.

Included blocks #

Recipe Card #

With this block you can insert a recipe card on a recipe post. Recipe card block is automatically added when you create a new recipe at Recipe → Add New Recipe so you don't have to manually add the block every time you add a new recipe.

This block does not have any options on the sidebar. Please note also that there can be only one recipe card per recipe.

The recipe editor at the WordPress dashboard shows a stripped down version of the recipe card. The styling for the recipe card can be done at Appearance → Customize → Yummy Recipes.

Recipe Collection #

This block is used to add a list of recipes from a collection to a page or post content.

You can find your collections by going to Recipes → Collections at the WordPress dashboard.

To quickly add recipes to a collection go to Recipes and use the Quick Edit link (available when you move your mouse over the recipe title). Of course you can also use the post editor screen to add the recipe to a collection.

Please note that if you haven't created any collections which have recipes this block cannot be used.

Recipe Index #

Recipe index block allows you to show all the recipes grouped either by alphabets or by terms from a chosen taxonomy.

Using the taxonomies option enabled the Taxonomy option which allows you too choose the taxonomy which terms are used for the index.

If you are using the alphabetical option, you can use the Show links to groups to show links to alphabets before the recipe listing.

Use the Style option to show the recipes as a list or as cards.

Search Form #

Only on Yummy Recipes Premium!

With the search form block you can insert a recipe search form to any page. Results of the search are updated without a page reload. In the block options you can choose which taxonomies the recipes can be filtered with. Enable the keyword option to show a keyword search in the form.

Important: With the Search Form block, you must also insert a search results block, Search Results.

Search Results #

Only on Yummy Recipes Premium!

This block shows the search results filtered by the search form block. It should be used together with the Search Form block.

You can choose how the recipes can be sorted and which is the default sorting argument. You can also set the number of search results shown per page.

Term Index #

This block adds an index of terms to any page. In the block options you can choose which taxonomies are shown on the index. You can also choose the styling, either list of links or cards.

User Bookmarks #

Only on Yummy Recipes Premium!

This plugin comes with a bookmarking feature. With this block you can easily create a page which shows the bookmarked recipes for the user.

Use the style argument to set the styling for the recipes. List shows bookmarks as a normal list, while cards shows bookmarks as small cards.

If the user has no bookmarks a notice is displayed.