Blocks & Shortcodes

Every block, shortcode and link, in one place

A reference for placing Allspice elements exactly where you want them.

Overview

Allspice ships blocks for the WordPress editor and shortcodes for anywhere blocks are not available - classic editor, theme templates, page builders, widget areas.

Most publishers never need this page: the plugin places what it needs automatically. Reach for these when you want a specific element in a specific spot.

TIP:

Where a block and a shortcode do the same job, prefer the block. It previews in the editor, and it will not be left behind as visible text if the plugin is ever deactivated.

Blocks

Search for the name in the block inserter, or type /allspice in the editor.

BlockWhat it places
Floating buttonThe floating Allspice launcher, scoped to the post it is placed in.
RailThe Allspice rail, with its suggested-question bubbles.
Inline overview, style 1 & 2Two visual treatments of the recipe overview block.
Inline cooking CTAA call to action that opens guided cooking for the recipe on the page.
Inline save recipe formA save-this-recipe prompt, inline in the post.
Inline newsletter formA newsletter signup that feeds your connected email provider.
Meal plan productsYour meal plan products, purchasable in place.
Membership CTAA membership call to action with your live pricing and benefits. Renders on the server, so it is present for crawlers.

Shortcodes

Paste these anywhere shortcodes run.

ShortcodeWhat it places
[allspice_button]A standard Allspice button.
[allspice_floating_button]The floating launcher.
[allspice_inline_chat]Pico chat, inline in the content.
[allspice_inline_search]A search box inline in the content.
[allspice_search]The full search experience. This is what the Advanced Search page uses.
[allspice_inline_cooking_cta]The guided-cooking call to action.
[allspice_inline_overview_style_one]Recipe overview, first style.
[allspice_inline_overview_style_two]Recipe overview, second style.
[allspice_membership]The membership landing content. Kept working for pages generated by earlier plugin versions; new membership pages use editable blocks instead.

Often you do not need a block at all - you need an ordinary link that opens Allspice. Use these as the href on any button, menu item, or email link. The plugin opens the right screen in place, without loading a new page.

LinkOpensWorks
#allspice-membershipMembership signup and pricingAny page
#allspice-loginSign-inAny page
#allspice-accountThe reader's account and billingAny page
#allspice-searchSearch. Accepts a query: #allspice-search?q=chickenAny page
#allspice-mealplansThe meal plan storeAny page
#allspice-saveSave this recipeRecipe pages only
#allspice-groceriesAdd this recipe to groceriesRecipe pages only
#allspice-guided-cookingGuided cooking for this recipeRecipe pages only
TIP:

The last three act on the recipe being viewed, so they do nothing in a site menu or on a page with no recipe. The first five work anywhere the plugin is active.

You can also deep-link a specific meal plan product by appending its id: #allspice-mealplans-prod_XXXX. The portal gives you the full link for email campaigns.

Troubleshooting

A shortcode is showing as text on the page

The plugin is inactive, or the shortcode name is misspelled. Check the exact spelling against the table above.

A block renders in the editor but not on the site

Usually aggressive JavaScript deferral or optimisation. See plugin compatibility for the exclusions to add.

A recipe-scoped element does nothing

Confirm the page actually has a recipe Allspice can parse. See recipe parsing.

A link hash does nothing

  • Confirm the plugin is active on that domain
  • Check it against the table above - some routes are recipe-page only