[recipe-list]

The [recipe-list] short code provides a list of recipes on your post or page. There are several options available:

  • category: Display recipes from only one category.
    • Format: category=slug - where slug is the slug for the category.
    • Default: All categories
  • category_parent: Display recipes from one category and it’s children.
    • Format: category_parent=id – where id is the category ID.
    • Default: All categories.
  • group_cat: Group list of recipes by category.
    • Format: group_cat=OPTION where OPTION is either “asc” for ascending order or “desc” for descending order.
    • Default: false – just show all recipes in order. Does not work with the category option above.
  • sort_column: Set the sort column for the list.
    • Format: sort_column=column name
    • Options: title, slug, notes, ingredients, instructions, views_total, comments, added
    • Default: title
  • sort_order: Set the order for the list
    • Format: sort_order=asc
    • Options: asc or desc
    • Default: asc
  • limit: Limit the number of recipes displayed
    • Format: limit=int – where int is any whole number
    • Default: unlimited

Display Paramenters

  • style: Determines how the recipes will be listed.
    • Format: style=style
    • Options: list (unordered list) or template (use list templates).
    • Default: list
  • template: Sets a default template
    • Fromat: template=file where file is the name of the template file with no extension.
    • Default: Defaults to standard as of version 0.9.6.
  • title: Add a title to the list of recipes
    • Format: title=text – where text is the title you want to display. This is not used when group_cat parameter is used.
    • Default: none
  • ul_class: Set the css class name for the <ul> tag.
    • Format: ul_class=classname – where classname is the name of the class in your CSS file.
    • Default: recipe-list
  • li_class: Set the css class name for each <li> tag.
    • Format: li_class=classname – where classname is the name of the class in your CSS file.
    • Default: recipe-item
  • show_author: Display the recipe author in the list.
    • Format: show_author=0 – Options are either 0 to hide or 1 to show.
    • Default: 0 (hide)

Examples

  • To display all recipes with the newest listed first, use [recipe-list sort_column=added sort_order=desc]
  • To display all recipes grouped by category in alphabetical order, use [recipe-list group_cat=asc]

Popularity: 9%