Food Truck

Import the Food Truck design and it brings blocks and content types of its own, on top of the main Canvas library. Read this page when you are working on a site built from Food Truck and meet a block you cannot find in the main reference.

These items stay registered on every site so that content you have already imported keeps rendering, and they appear in the block inserter only where the design is in use.

Blocks this design adds

Food Truck Menu

canvas-core/food-truck-menu

Display dishes from the Menu Items post type as photo cards with a tag, price and spice level, the category tab strip, or one piece of an item or category page (tag, price, spice, category, category name and description). In the block inserter it is named Canvas Food Truck Menu.

Select the block on a page and its own settings open in the sidebar, in the panels below:

The Food Truck Menu settings in the block editor sidebar

Layout

  • LayoutDefaultMenu Cards

    Which part of the menu design this block draws. Each "Single Item" choice renders one piece of the item page you place it on, and each "Category Page" choice one piece of a menu category page; they render nothing anywhere else.

    ChoicesMenu CardsCategory TabsSingle Item - More DishesSingle Item - TagSingle Item - PriceSingle Item - Spice LevelSingle Item - CategoryCategory Page - NameCategory Page - Description

Query

  • Category SlugDefaultEmpty

    Show only the dishes in one category, written as its slug (tacos, burgers, sides, drinks). Leave empty to show them all.

  • Follow the Category PageDefaultOff

    On a menu category page, show only that category and ignore the slug above. Off everywhere else.

  • ItemsDefault0

    0 shows every dish. More Dishes shows three when this is left at 0.

  • Order ByDefaultMenu Order

    What decides the sequence of the dishes. Menu Order lets you arrange them by hand on the menu list screen.

    ChoicesMenu OrderDateTitle

  • OrderDefaultAscending

    Which end of that sequence comes first.

    ChoicesAscendingDescending

Cards

  • Grid ClassesDefaultrow g-4

    Class names on the row holding the cards.

  • Column ClassesDefaultcol-md-6 col-lg-4

    Class names on the column around each card, which set how many sit side by side.

  • Column EntranceDefaultfadeInUp

    The entrance animation each column plays as it scrolls into view, such as fadeInUp. Leave empty for none.

  • Entrance DelaysDefault100, 200, 300

    Milliseconds each column waits before its entrance, separated by commas, given to the columns in turn and repeated from the start when the list runs out. Leave empty for no delay.

  • Record ClassesDefaultOn

    Add WordPress's own record classes (post id, type, status) to each column, so a stylesheet or script can single a dish out.

  • Card ClassesDefaultmenu-card

    Class names on each card.

  • Photo Frame ClassesDefaultmenu-card-img

    Class names on the frame around the dish photograph.

  • Photo Inline StyleDefaultaspect-ratio:4/3;

    Inline CSS on the photograph itself.

  • Photo SizeDefaultfull

    The registered image size the photograph is drawn at, such as full or large.

  • Tag ClassesDefaultmenu-card-tag

    Class names on the tag over the photograph (the dish's own Tag setting). Leave empty to hide tags.

  • Card Body ClassesDefaultmenu-card-body

    Class names on the text panel under the photograph.

  • Name ClassesDefaultmenu-card-name

    Class names on the dish name.

  • Name ElementDefaultdiv

    The element the dish name is written in. Use a heading on a page where the names are the next level under the page heading.

    Choicesdivh2h3h4

  • Link the NameDefaultOff

    Link each dish name to the dish's own page.

  • Description ClassesDefaultmenu-card-desc

    Class names on the description (the dish's excerpt). Leave empty to hide it.

  • Footer ClassesDefaultmenu-card-footer

    Class names on the row holding the price and the spice level.

  • Price ClassesDefaultmenu-card-price

    Class names on the price.

  • Spice ClassesDefaultmenu-card-spice

    Class names on the spice level.

  • Spice IconDefaultbi-fire

    The glyph repeated once per spice level.

Tabs

  • Tab Strip ClassesDefaultmenu-tabs

    Class names on the row holding the tabs.

  • Tab ClassesDefaultmenu-tab

    Class names on each tab.

  • Current Tab ClassDefaultactive

    The class that marks the tab of the menu being shown.

  • All Tab LabelDefaultAll

    The first tab, which leads to the full menu. The other tabs are the menu categories, in their own order.

  • Full Menu PageDefaultmenu

    The slug of the page listing the whole menu, opened by the first tab. Each other tab opens its category's page.

Element

  • ElementDefaultdiv

    The element a single-element layout is written in.

    Choicesdivspanph1h2h3

  • Element ClassesDefaultEmpty

    Class names on that element.

  • Element Inline StyleDefaultEmpty

    Inline CSS on that element.

  • Link the CategoryDefaultOff

    On the Category layout, link the category name to its own page.

Was this page helpful?
Food Truck · Canvas WP Docs