Skip to content

Template Shortcodes

Armand Tresova edited this page Aug 17, 2024 · 4 revisions

There are several shortcodes that are used when creating your recipe templates. You can use a different template for each recipe, or create one you like and then save it as the default by clicking the Save as Default button above the editor window.


[cooked-info]

This shortcode is used to display meta information about your recipe. This information is displayed in small blocks that float to the left or right. To add meta blocks using this shortcode you can use the "include", "exclude", "left", or "right" options and then provide a list of info you want to display:

include — This will include the info blocks you give it, all aligned to the left.
exclude — This will include all of the available info blocks, excluding the ones you give it, all aligned to the left.
left — This will include the info blocks you give it, all aligned to the left.
right — This will include the info blocks you give it, all aligned to the right.

So what can you include?

author — Display the recipe author's profile image and their name.
prep_time — Display the prep time.
cook_time — Display the cook time.
total_time — Display the total time.
difficulty — Display the difficulty level.
servings — Display the servings switcher tool.
taxonomies — Display the taxonomies (categories) . print — Display the icon button to launch the print view.
fullscreen — Display the icon button to launch full-screen mode.

Put it all together now!

Each info block needs to be separated by a comma. So for example, the following shortcode will display the author, categories, and difficulty on the left, and then the print and fullscreen icons on the right:

[cooked-info left="author,taxonomies,difficulty" right="print,fullscreen"]

Or if you want to display the servings switcher on the left, cook times on the right:

[cooked-info left="servings" right="prep_time,cook_time,total_time"]

Or to just display everything:

[cooked-info]

[cooked-ingredients]

This shortcode is used to display the ingredients. There is just one option, and that is to hide the checkboxes that are shown by default. You can hide those by adding checkboxes="false" to the shortcode:

[cooked-ingredients]
[cooked-ingredients checkboxes="false"]

[cooked-directions]

This shortcode is used to display the ingredients. There is just one option, and that is to hide the checkboxes that are shown by default. You can hide those by adding checkboxes="false" to the shortcode:

[cooked-directions]
[cooked-directions numbers="false"]

[cooked-image]

This shortcode is used to display the featured image, if one is set.

[cooked-image]

[cooked-nutrition]

This shortcode is used to display the nutrition facts label, if any nutrition information has been entered.

[cooked-nutrition]

[cooked-gallery]

This shortcode is used to display the gallery, if one has been set or created on the Gallery tab.

[cooked-gallery]

Available options include "width", "ratio", "nav", and "allowfullscreen". Width can be something like "300px" or "80%". Ratio is the ratio of the images being displayed. Something like "16/9" or "5/4" works, or something more precise like "500/425". Nav defaults to "true" and controls whether or not you want to display the navigation (arrows and bullets) on the gallery, and Allowfullscreen defaults to "true" and enables or disables the full screen mode for the gallery.

[cooked-gallery width="300px" ratio="300/250" nav="false" allowfullscreen="false"]

[cooked-excerpt]

This shortcode is used to display the excerpt, if one has been set.

[cooked-excerpt]

[cooked-notes]

This shortcode is used to display the notes. There is just one option, and that is to show the header or title. You can show the header by adding show_header="true" to the shortcode:

[cooked-notes]
[cooked-notes show_header="true"]